Articles Anywhere

Nested if statements

2 months 1 week ago #90182

Laurent's Avatar Laurent

Hello,

I have this :

<div class="last-actis__links">
                <a class="last-actis__plus" href="{if catid=14}index.php?option=com_content&amp;view=article&amp;id=16&amp;Itemid=154{/if}{if catid=22}index.php?option=com_content&amp;view=article&amp;id=12&amp;Itemid=140{/if}{if catid=13}index.php?option=com_content&amp;view=article&amp;id=13&amp;Itemid=141{/if}{if catid=21}index.php?option=com_content&amp;view=article&amp;id=49&amp;Itemid=236{/if}{if catid=23}index.php?option=com_content&amp;view=article&amp;id=72&amp;Itemid=262{/if}" title="{if catid=14}Voir nos cours de cuisine tandem{/if}{if catid=22}Voir nos cours de cuisine adulte{/if}{if catid=13}Voir nos soirées Mets et Vins{/if}{if catid=21}Voir nos soirées à thèmes{/if}{if catid=23}Voir nos animations{/if}">En savoir plus</a>
                {if catid=13 AND bouton2}
                    <a class="last-actis__button button" href="index.php?option=com_rsform&amp;formId=4&amp;Itemid=144&amp;form[objet]=sinscrire&amp;form[liste-soirees]=[alias]" title="Vers la page d'inscription à une soirée Mets et Vins">S'inscrire</a> 
                {elseif catid=14 AND bouton2} 
                    <a class="last-actis__button button" href="index.php?option=com_rsform&amp;view=rsform&amp;formId=4&amp;Itemid=144&amp;formId=4&amp;form[objet]=reservation&amp;form[liste-cours]=[alias]" title="Vers la page de réservation Tandem">Réserver</a> 
               {/if}
            </div>

Is it possible to nested the if like this :
<div class="last-actis__links">
    <a class="last-actis__plus" href="{if catid=14}index.php?option=com_content&amp;view=article&amp;id=16&amp;Itemid=154{/if}{if catid=22}index.php?option=com_content&amp;view=article&amp;id=12&amp;Itemid=140{/if}{if catid=13}index.php?option=com_content&amp;view=article&amp;id=13&amp;Itemid=141{/if}{if catid=21}index.php?option=com_content&amp;view=article&amp;id=49&amp;Itemid=236{/if}{if catid=23}index.php?option=com_content&amp;view=article&amp;id=72&amp;Itemid=262{/if}" title="{if catid=14}Voir nos cours de cuisine tandem{/if}{if catid=22}Voir nos cours de cuisine adulte{/if}{if catid=13}Voir nos soirées Mets et Vins{/if}{if catid=21}Voir nos soirées à thèmes{/if}{if catid=23}Voir nos animations{/if}">En savoir plus</a>
        {if bouton2}
            <a class="last-actis__button button" href="{if catid=13}index.php?option=com_rsform&amp;formId=4&amp;Itemid=144&amp;form[objet]=sinscrire&amp;form[liste-soirees]=[alias]{elseif catid=14}index.php?option=com_rsform&amp;view=rsform&amp;formId=4&amp;Itemid=144&amp;formId=4&amp;form[objet]=reservation&amp;form[liste-cours]=[alias]{/if}" title="Vers la page d'inscription à une soirée Mets et Vins">{if catid=13}S'inscrire{else}Réserver</a> 
        {/if}
</div>

Thanks

2 months 1 week ago #90183

Peter van Westen's Avatar Peter van Westen Admin

No, you can't nest if tags.