Aug 08, 2008, 01:48 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Read what MODx Developers say: MODx Dev. Blogs
Pages: [1]   Go Down
  Print  
Author Topic: Preserving QuickEdit access to TVs rendered by Ditto  (Read 5262 times)
0 Members and 1 Guest are viewing this topic.
shuriken
Jr. Member
*
Posts: 31


« on: Jun 06, 2007, 01:29 AM »

Hi,
I've got a 'Contacts' page which lists several company offices along with their contact info. I've set each info field as a TV so the site owner can easily edit the values, and created each company office as a document, pulled into the contacts page by Ditto.

This means that I can't use QuickEdit on the Contacts page to edit the individual TV values.

The only workaround I can think of is to provide a link to each individual company office document where the logged in user can edit the TVs directly. Is there any way that I can make this link appear only when the content editor is logged in and using QuickEdit? Something that would work like <quickedit:goto[(base_url)][~[+id+]~] /> (I may end up hacking this into quick_edit/output.class.inc.php). I want it to be a button saying 'Edit <company office>'.

I hope I'm not missing something obvious -- I still have a lot to learn about TVs.
Any help appreciated.
Logged
Mark
Moderator
*
Posts: 3,247


Ditto Developer


WWW
« Reply #1 on: Jun 06, 2007, 07:23 PM »

Ditto already supports QuickEdit. Just do [+#pagetitle+] for example.
Logged

shuriken
Jr. Member
*
Posts: 31


« Reply #2 on: Jun 06, 2007, 07:41 PM »

Thanks Mark. Couldn't find it in the docs.

I also found that [+#tvmy_tv+] did not work, but OTOH the [+tv...+] syntax isn't necessary. Both [+my_tv+] and [+#my_tv+] work fine.
« Last Edit: Jun 06, 2007, 07:58 PM by shuriken » Logged
nate22
Member
**
Posts: 99


« Reply #3 on: Mar 07, 2008, 03:06 PM »

Ditto already supports QuickEdit. Just do [+#pagetitle+] for example.

Where and how do you use [+#pagetitle+] for example?
Logged

NOTE TO SELF: http://www.muddydogpaws.com/development/wayfinder/examples/example-1.html for all your navigational questions.
sottwell
Documentation Team
*
Posts: 7,628



WWW
« Reply #4 on: Mar 07, 2008, 07:25 PM »

In your Ditto view template.
Logged

sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
The templates that were available on loripsum.co.uk will become available on the sottwell.com server once I get it properly organized.
nate22
Member
**
Posts: 99


« Reply #5 on: Mar 07, 2008, 10:24 PM »

In your Ditto view template.

By Ditto view template, do you meant in the `DittoTemplate` Chunk which gets appended to the Ditto Snippet call (ie. &tpl=`DittoTemplate`)?
Logged

NOTE TO SELF: http://www.muddydogpaws.com/development/wayfinder/examples/example-1.html for all your navigational questions.
sottwell
Documentation Team
*
Posts: 7,628



WWW
« Reply #6 on: Mar 08, 2008, 05:28 AM »

Yes.
Logged

sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
The templates that were available on loripsum.co.uk will become available on the sottwell.com server once I get it properly organized.
dev_cw
Testers
*
Posts: 2,053



« Reply #7 on: Mar 18, 2008, 08:19 PM »

Is there a way to get <quickedit:someTV /> to work in a Ditto tpl? When I try it it looks for the current document rather than the one referenced by Ditto.

My objective is to add a way for the user to edit a file TV embedded in a ditto tpl. When I use the standard [+#fileTV+] it breaks the "download" link and causes all sorts of havoc to the html making it look sloppy.

Thanks.
Logged

Shane Sponagle | Snippet Call Anatomy | Document Specific Variables

Hey Brian, there is a message in my Alphabits. It says Ooooooo.
Peter, those are Cherios.
Mark
Moderator
*
Posts: 3,247


Ditto Developer


WWW
« Reply #8 on: Mar 18, 2008, 08:21 PM »

No, there is no current way to use <quickedit> tags in Ditto templates. The Quickedit plugin itself would need to change to allow an ID to be passed to it as Ditto only parses for [+#pagetitle+] style placeholders.
Logged

dev_cw
Testers
*
Posts: 2,053



« Reply #9 on: Mar 18, 2008, 08:32 PM »

OK, I will work on an alternative to resolve tis issue. Thanks.

BTW - that was a fast response...talk about great service Grin
Logged

Shane Sponagle | Snippet Call Anatomy | Document Specific Variables

Hey Brian, there is a message in my Alphabits. It says Ooooooo.
Peter, those are Cherios.
dev_cw
Testers
*
Posts: 2,053



« Reply #10 on: Mar 22, 2008, 09:34 AM »

FYI - I resolved the issue above by using the ManagersOnly snippet and then putting the direct code to open QE for the TV in question like this:

Code:
<a href="[~[*id*]~]?qe_open=true#" onclick="javascript: window.open('[(base_url)]manager/index.php?a=112&id=2&doc=[+id+]&var=DocFIle', 'QuickEditor', 'width=525, height=300, toolbar=0, menubar=0, status=0, alwaysRaised=1, dependent=1');" title="Edit : Download Document" class="QE_Link">&laquo; Edit : Download Document</a>
To change the TV just edit the &var= of the url with the name of your TV. I also edited the title to keep it clean and to the point, but you could also add [+pagetitle+] to the title to make it more descriptive. Humm, this could be made into a nice little snippet as well to make it easy to add QE buttons.

This worked like a charm and I can now add edit links for documents and images directly in my Ditto display without breaking the links. Cool.  Grin
Logged

Shane Sponagle | Snippet Call Anatomy | Document Specific Variables

Hey Brian, there is a message in my Alphabits. It says Ooooooo.
Peter, those are Cherios.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!