We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51824
    • 27 Posts
    Somehow getResources and I don't become friends...

    Structure looks like:

    >vocapella ( defined as container) - Resource-ID = 15
    I
    --- subpage 1 (Resource-ID = 17)
    I
    --- subpage 2 (Resource-ID = 18)
    I
    --- subpage 3 (Resource-ID = 20)

    ...and so on.

    The following call on "vocapella (15) " does what it's supposed to do: it displays a short summary of all three subpages:
    [[getResources?  &tpl=`tpl_titel` &includeTVs=`1` &sortby=`id` &sortdir=`ASC`]]
    


    But as I don't want to display all subpages as summary, I made a TV called "VocapellaTitelseite", type: radio-button, possible values "ja" and "nein". It is set to "ja" on subpage 1 and 2.

    Now I modified the getResource-Call - now it looks like:

    [[getResources?  &tpl=`tpl_titel` &includeTVs=`1` &tvFilters=`VocapellaTitelseite==ja` &sortby=`id` &sortdir=`ASC`]]
    



    ...and now it displays nothing. I don't understand why not...

    This question has been answered by treigh. See the first response.

    • discuss.answer
      • 30585
      • 833 Posts
      I'd first try the === operator:
      [[getResources?  &tpl=`tpl_titel` &includeTVs=`1` &tvFilters=`VocapellaTitelseite===ja` &sortby=`id` &sortdir=`ASC`]]


      If this doesn't work, I'd try try wrapping the tv filter with a percentage sign:
      [[getResources?  &tpl=`tpl_titel` &includeTVs=`1` &tvFilters=`VocapellaTitelseite==%ja%` &sortby=`id` &sortdir=`ASC`]]


      Last, I'd try both methods:
      VocapellaTitelseite===%ja%
        A MODx Fanatic
        • 51824
        • 27 Posts
        Sorry for answering two days later...

        Thank you! "===" did it!
          • 30585
          • 833 Posts
          Glad it helped.
            A MODx Fanatic