Search
Other Articles Anywhere questions
Forum

If multiple input ids are in different categories output a string

Thomas Venugopal's Avatar Thomas Venugopal
Hello,

I have multiple parameter in my url to show different articles on a page. I want to prevent that a team member uses values from different categories and output a warning. I tried this and many other variations, but didn't get it to work:
{articles}
  {if input:hl=id IN category=265 && input:hr=id IN category=272}conflict{/if}
{/articles}

So, if someone with a URL like this /page?hl=1&hr=2 where the hl-value is in category 265 and the hr-value is in category 272 it should say "conflict". Do you have a hint? Thank you for the great support by the way!
Peter van Westen's Avatar Peter van Westen ADMIN
The {articles} tag needs filters.
The {articles} tag will repeat what is inside it for EVERY article that is returned by it.
So if you want to output a single thing, make sure the filters in the {articles} tag make it return just a single article.
Then do whatever if conditions you need inside to conditionally show something.

Please read through the documentation to see how it all works before asking for support.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription