Answer the question
In order to leave comments, you need to log in
Smarty REQUEST_URI and regular expressions?
Hello, there is an if-elseif construct:
{if $smarty.server.REQUEST_URI == '/'}
---
{elseif $smarty.server.REQUEST_URI == '/page_16.html'}
---
{/if}
---
{elseif $smarty.server.REQUEST_URI == '/page_\d+\.html'}
---
Answer the question
In order to leave comments, you need to log in
You don't need to do this in the template. Do not check the address in it.
Check IDs and compare routes. But not parts of addresses.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question