Sep 07, 2008, 02:12 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:Donate to MODx: Donations
Pages: [1]   Go Down
  Print  
Author Topic: Template Variables in Ditto +content+ placeholder  (Read 898 times)
0 Members and 1 Guest are viewing this topic.
mmilo
Jr. Member
*
Posts: 1


« on: Apr 15, 2008, 09:16 PM »

Hi all,

Is there a way to have a template variable show up in the [+content+] placeholder for Ditto?

Note: I'm not placing the template variable in the Ditto template, as seen here (http://modxcms.com/forums/index.php/topic,6120.0.html)

I made a simple text TV, and set a value for it in the document itself. When I go to the actual document link, the TV will show, as expected. However, when Ditto is listing the documents, the [+content+] placeholder won't output the TV. It's not a problem of truncation, since any text I put after the TV shows up, and trunc=`0` is on.


Also --- I noticed that the parameters listing for Ditto 2.x doesn't include the 1.x ones. Is it supposed to be this way? Should I just refer to the two of them?

Thanks,
Mike



Logged
sottwell
Documentation Team
*
Posts: 7,908



WWW
« Reply #1 on: Apr 15, 2008, 11:34 PM »

When Ditto outputs the content, it is a direct display of the content; the content is not parsed, it's taken straight from the database. So any MODx tags will not be processed.
Logged

sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html
bwente
Member
**
Posts: 96



« Reply #2 on: May 20, 2008, 08:14 AM »

I don't know if you found your solution, but I thought I would put here so the next person would find it.

&hiddenFields=`myTVinsideContent`



Logged
dab
Jr. Member
*
Posts: 13


« Reply #3 on: Jun 30, 2008, 05:56 AM »

This template (lastnews) shows the full news item on the home page:

 
Code:
   <div class="ditto_item" id="ditto_item_[+id+]">
        <h3 class="ditto_pageTitle"><a href="[~[+id+]~]">[+pagetitle+]</a></h3>
        <div class="ditto_documentInfo">by <strong>[+author+]</strong> on [+date+]</div>
        <div class="ditto_introText">[+content+]</div>
    </div>


& show using...

Code:
[[Ditto? &amp;startID=`2`&nbsp; &amp;removeChunk=`Comments` &amp;tpl=`lastnews` &amp;paginate=`1` &amp;extenders=`summary,dateFilter` &amp;paginateAlwaysShowLinks=`1` &amp;tagData=`documentTags`]]
Logged
AndreasT
Member
**
Posts: 81


« Reply #4 on: Aug 28, 2008, 09:17 AM »

I don't know if you found your solution, but I thought I would put here so the next person would find it.

&hiddenFields=`myTVinsideContent`

Thanks, this works nicely. I was planning to further abstract it by putting the content in a chunk as the content is identical except for the TVs.

But Ditto does not parse a chunk in the content either, is there a similar way to make it parse a chunk?

A quick rundown of what I am trying to achieve: I am building a page that displays customer endorsements. I have created a container which serves as the displayed document. Inside the container is a separate document for each endorsement. These documents have TV's for text, logo, image alt text and signature.
I am using ditto in the container to display the full content from these documents. The &tpl is a chunk with simply [+content+].

Cheers,

Andreas
Logged
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!