We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30319
    • 406 Posts
    Presently I have this code in wordpress.config.php for reflect:


    $showItems=0;
    $groupByYears=0;
    $defaultTemplates['tpl'] = <<<TPL
    <h3>[+longtitle+] Archive</h3>
    <div class="reflect_archive_list">
        <ul class="reflect_archive">
        [+wrapper+]
        </ul>
    </div>
    TPL;
    $tplMonth = '@CODE 
    	<li class="reflect_month">
    		<a href="[+url+]" title="[+month+] [+year+]" class="reflect_month_link">[+month+] [+year+]</a>
    		[+wrapper+]
    	</li>
    ';
    $monthSortDir='DESC';


    Where it says ’longtitle’ above, I need a placeholder, to insert the longtitle text specific to the Ditto news pages it’s used on.

    How do I do this?? Using [+longtitle+] has no effect.

    I also found the default.templates.php file and tried modifying that to no avail.

    Thank you, Tom

      • 29201
      • 239 Posts
      I would really like to know the answer to this as well.

      I'd like to get the page title [+pagetitle+] showing instead of the date. I can get it using it [*pagetitle*] but of course that is the page title of the current page not the individual resources.

      Can anyone help??
      • I don't really see how it could be a placeholder, since the placeholders (except the wrapper) are referring to the values for each resource in the list. If you want the value from the page the Ditto and Reflect snippets are actually on, then you need to use the resource field, [*longtitle*].

        The tpl is coded so that the only placeholder in it is the wrapper, and it uses a Ditto object method to process placeholders.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 29201
          • 239 Posts
          so it's not possible to have the title of the page show up instead of the date?

          surely someone must have solved this before .... maybe using Ditto instead of Reflect?

          (i.e. for my Archives I would like them to display the season: Fall 2010, Spring 2011, Summer 2011) instead of August 2010, April 2011, etc.)