I do not handle a lot of PHP.
I have a part of the site that contains a <a>
with the current path where the client is.
This is the code:
<a href="
<?php if(preg_match("/segmentos/i", $_SERVER['REQUEST_URI']))echo '/segmentos/neomot-'.$url[0]; ?>
<?php if(preg_match('/elevadores\/atuacao/i',$_SERVER['REQUEST_URI'])) echo '/atuacao'; else echo '/produtos';?>">
<?php if(preg_match('/elevadores\/atuacao/i',$_SERVER['REQUEST_URI'])) echo 'Atuação'; else echo 'Produtos';?>
</a>
/elevadores/iluminacao
it will give a echo
with the correct url, if it is not that and it is iluminacao/produtos
it will do echo to produtos
for example, and if I want to put one more condition?
Type include cases also in the same way you are in products.