Search
Other Articles Anywhere questions
Forum

Check if ID is in URL parameter AND then outout a string if it's a specific category

Thomas Venugopal's Avatar Thomas Venugopal
Hi,

what I want to achieve is: if the URL contains a parameter which ID is in a specific category output a specific string.

I tried:
{articles id="input:hl" category="265,272"}{if category="265"}free text{/if}{if category="272"}another text{/if}{articles}

But this breaks my layout somehow.

I know what I need but need help to formulate that in the correct syntax. First I need to check if the url parameter hl has a valid value (valid is when the given id is in on of these cat ids: 265 or 272) then if the id from the URL is in one of these categories output a specific text for each category. Is this possible, or am I trying something impossible (and finally found the limit of articles anywhere 😁)?

Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
You have no closing tag. Use {/articles} instead of {articles}

Also, you could do this too:
{articles id="input:hl" category="265"}free text{/articles}
{articles id="input:hl" category="272"}another text{/articles}
Please post a rating at the Joomla! Extensions Directory
Thomas Venugopal's Avatar Thomas Venugopal
Thank you! I’m confusing filters and if-statements…
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription