We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8454
    • 55 Posts
    With the kind help of David Bunker (bunk58) I solved the parse error issue by pointing those instances to the general All product page, which also makes sense if no product group has been actively chosen.
    <?php
    $value = $_GET['frompage'];
    if(empty($value)){
    $value = (56);
    }
    $filter='seProductGroup,'.$value.',7';
    
    56 is the All products pageid
      • 8454
      • 55 Posts
      Well, I found some more info and put this in the Input Option Values field:
      @SELECT pagetitle, id FROM modx_mysite_site_content WHERE parent='96'
      which works fine and is convenient because it displays only the pagetitles for choosing, but saves the id(s) as the actual TV value.

      However, since I use the id:s to filter the Ditto call, and since there can be several id:s chosen I have to use the Ditto mode 7 (=exclude documents if its value in the specified field does not contain the criterion text).

      When adding the pageid values manually I solved this by typing "(XX)", i.e. the id surrounded by brackets. The criterion got brackets also: "([*id*])"
      This way I avoided e.g. productgroup ’33’ matching pageid ’133’, which would have been the case without brackets.

      Now I don’t know how to get the brackets there when using the @SELECT binding. Can I construct it using a snippet? How would that be done? Most grateful for any hint. (Converting the TV based chunks example was above my level)