Search code examples
templatesmodxmodx-evolutionditto

ModX: Using Ditto with template variables


I am having a great deal of difficulty getting my head round displaying secveral resources on one page with Ditto. I cant seem to get TV's to show along with my content.

Heres how I have set it out:

  • I have a page with my Ditto call:

    [!Ditto? &parents='134' &orderBy='createdon ASC' &tpl='temp'!]

  • I have a simple chunk called temp set up as such:

    <div id="content"> [*articlename*] [+content+] </div>

  • And I have a template with the TV articlename assigned to all the resource under parent 134.

The content shows fine but none of the TV's do. Can anyone point me in the right direction? thanks!


Solution

  • I think the problem is in your syntax. You need to use a placeholder tag in the chunk for your TV:

    Try this:

    <div id="content"> [+articlename+] [+content+] </div>