We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5160
    • 118 Posts
    Hi,

    I have a getPage/getResources call that has the tvFilters parameter set. The call works when the value for tvFilters is hard coded but there is no output when I set the tvFilters value with a placeholder (nor any entry in the Error Log).

    The placeholder is set with a simple snippet:

    [[!querystring]]


    The querystring snippet source is:

    <?php
    $modx->setPlaceholders($_REQUEST,'GET.');


    If I include the [[+GET.manufacturer]] placeholder before the getResources call it outputs whatever I set value of manufacturer to in the querysting. If I change the value in the querystring it updates so it doesn't look like a caching issue.

    The getResources call is:

    [[getPage?
                &elementClass=`modSnippet`
                &element=`getResources`
                
                &parents=`[[*id]]`
                &depth=`0`
                &limit=`8`
                &pageVarKey=`page`
                
                &sortby=`{"menuindex":"ASC"}`
                &showHidden=`0`
                
                &includeTVs=`1`
                &includeTVList=`image`
                &includeContent=`0`
                   
                &tvFilters=`manufacturer==[[+GET.manufacturer]]`
                   
                &tpl=`categories-list-tpl`
            ]]


    If I hard code the tvFilters value the call works:
    &tvFilters=`manufacturer==rcm`


    The manufacturer TV type is Listbox (single select) but I don't think this is relevant as hard coding the tvFilters value works.

    Can anyone suggest why setting the value of tvFilters with the [[+GET.manufacturer]] placeholder fails?

    Thanks

    This question has been answered by chris.dempsey78. See the first response.

    [ed. note: chris.dempsey78 last edited this post 12 years, 10 months ago.]
    • discuss.answer
      • 5160
      • 118 Posts
      I went back to this for a minute and it is a cache issue after all, that and my own stupidity. getPage should be called uncached. [ed. note: chris.dempsey78 last edited this post 12 years, 10 months ago.]