cLink.ftl

 1   <#-- Macro: cLink
 2   
 3   Description: permet de créer un lien.
 4   
 5   Parameters:
 6   
 7   @param - id - string - optional - l'ID du lien
 8   @param - class - string - optional - ajoute une classe CSS au lien. Afin de donner l'illusion d'un bouton, il est possible d'utiliser la classe 'btn' suivi de la classe du bouton souhaité (par exemple: 'btn btn-primary'). Ne pas hésiter à consulter les exemples dans la macro cButton.
 9   @param - href - string - required - permet définir l'url de redirection du lien
 10   @param - label - string - required - permet définir le libellé du lien
 11   @param - title - string - optional - permet définir l'attribut 'title' du lien
 12   @param - nestedPos - string - optional - permet de définir la position du contenu "#nested"(par défaut: 'after')
 13   @param - target - string - optional - permet de définir le type d'ouverture du lien via l'attribut 'target' (valeurs possibles: '_blank', '_top', '_parent' ou 'id')
 14   @param - showTarget - boolean - optional - permet d'afficher un icon si target='_blank' (par défaut: false)
 15   @param - params - string - optional - permet d'ajouter des parametres HTML au lien
 16   -->
 17   <#macro cLink href label title='' nestedPos='after' target='' showTarget=false class='' id='' params='' deprecated...>
 18   <@deprecatedWarning args=deprecated />
 19   <a href="${href!}" <#if id!=''> id="${id!}"</#if> <#if class !='' >class="${class!}"</#if><#if title!=''> title="${title!}<#if target='_blank'> #i18n{theme.newWindowLink}</#if>"</#if><#if target!=''> target="${target}"</#if><#if params!=''> ${params}</#if> > 
 20   <#if nestedPos!='after'><#nested></#if>
 21   <#if label!=''><span class="link-label">${label!}</span></#if> 
 22   <#if nestedPos='after'> <#nested></#if>
 23   <#if target='_blank' && label=''><span class="visually-hidden visually-hidden-focusable"><#if title!=''>${title!}<#else>${label}</#if> #i18n{theme.newWindowLink}</span></#if>
 24   <#--  <#if target='_blank' && showTarget><svg width="18" height="18" viewBox="0 0 28 28" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3081_1959)"><path d="M4.48047 23.3337V4.66699H13.4405V7.2759H6.98501V20.7248H19.8959V14.0003H22.4005V23.3337H4.48047ZM11.6808 17.6429L9.94359 15.8334L18.1588 7.2759H15.3307V4.66699H22.4005V12.0314H19.8959V9.08545L11.6808 17.6429Z" fill="currentColor"/></g><defs><clipPath id="clip0_3081_1959"><rect width="28" height="28" fill="white"/></clipPath></defs></svg></#if>  -->
 25   </a>
 26   </#macro>