We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25727
    • 1 Posts
    Hello

    My Idea: I have a folder with several (hidden). On an other page I make a Ditto call for listing all these pages. Because there are quite a lot of pages in this folder, I’d like to order them by the first letter. So, I made a list with "letter-links" and if I click for example on A, I’d like to have only pages with pagetitle starting with A shown. That should give me a A to Z listing in the end.

    Approach: I made a template variable "sortAZ" which holds the first letter of the pagetitle. In the default values field of the tv I put the listing
    @EVAL return substr($modx->documentObject['pagetitle'], 0, 1);

    The Ditto call (in this example for "A") looks as follwing:
    [!Ditto? &parent=`4` &display=`all` &depth=`1` &sortDir=`ASC` &filter=`sortAZ, A, 7` &tpl=`tplList`!]


    Problem: I think the EVAL binding is not working within the Ditto call. I tested the values of the tv with [+sortAZ+] and they look fine. But as soos as the Ditto should get them, something does not work properly anymore. Is it possible, that Ditto cannot evaluate the tv within the call? Because if I change the "sortAZ" tv manually, the Ditto call works perfect. So, any Ideas?

    Thanks for the help and hopefully you understand my english and the explanation. Otherwise, just ask...