samedi 28 juillet 2018

How to use if condition to hide element in Smarty template (TYPO3)?

TYPO3 website is using Smarty template engine. In one existing template called header.tpl I have this code:

<div class="header">
...
</div>
<div class="nav">
...
</div>

Is there some way to hide div element with the class "nav" using if condition? This header.tpl is used on every page, but I want to achieve that only on page with id=3 (in TYPO3) the navigation part will be hidden.

For example:

<div class="header">
...
</div>
{if (???) }
<div class="nav">
...
</div>
{/if}

Thank you very much for your help.

Aucun commentaire:

Enregistrer un commentaire