Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Question about txp:if_request
I want to check if specific custom fields are used in the url. For example the field “location”: https://www.domain.com/photos/?location=Tokyo
If one of these custom fields is in the url, do “this action”.
I now have this:
<txp:if_request name="location,period,artist,publisher,medium" type="name">this action</txp:if_request>
But this also gives “this action” when another custom field (“translator”) is in the url.
What am I doing wrong?
• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)
Offline
Re: Question about txp:if_request
If you need it in an article list context, try
<txp:if_article_list type="location,period,artist,publisher,medium">
...
</txp:if_article_list>
Offline
Re: Question about txp:if_request
etc wrote #332228:
If you need it in an article list context, try
<txp:if_article_list type="location,period,artist,publisher,medium">...
That solved it wonderfully! Why didn’t I think of that, I now wonder. Sometimes, one overthinks…
Thank you so much for both solutions!
• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)
Offline
Pages: 1