Feature request/consideration: archive conditions

Would it be possible to add to the condition options for archive layouts a selector for string, just like you can for elements in a regular page?

I have been using custom search elements (with Ivory Search plugin) which return search urls that include things like &ID=1234 with the number varying depending on which custom search was used. I’d like to differentiate between which terms were being searched for when defining which archive layout should be used.

Try setting the Condition to
{{dc:url:param key="ID"}} then is then1234
where ID is the key you’re targeting and the 1234 to be specific query term you’re targeting

1 Like

Thank you @Jonson - that is the condition I was planning to set… but currently archive layouts do not allow conditions to be set as type:“Expression” (String, Number, Datetime).
Not sure why this is but I thought maybe there was a technical limitation/reason.

1 Like

@spedney, I solve this by setting the string condition not on the archive, but on sections that are supposed to show the personalized content. It is also easier for maintenance because you have only one archive to take care of.

2 Likes

Thanks @Misho that is what I am doing right now, but I was just wondering if this could also be added as a possibility as in some cases it might be preferable.

2 Likes

I wrote a note about adding string expressions / all scalar statements to the assignments. It’s something we can do, but there’s some housekeeping for me as this part of the code is very copy pasted.