link.ftl

 1   <#--
 2   Macro: link
 3   Description: Generates an HTML anchor link element with a specified URL, class, ID, name, title, alt text, target, and additional parameters.
 4   Parameters:
 5   - href (string, required): the URL for the link.
 6   - class (string, optional): additional classes to add to the link element.
 7   - id (string, optional): the ID for the link element.
 8   - name (string, optional): the name for the link element.
 9   - title (string, optional): the title for the link element.
 10   - alt (string, optional): the alternative text for the link element.
 11   - target (string, optional): the target for the link element, e.g., "_blank".
 12   - params (string, optional): additional parameters to add to the HTML code.
 13   -->
 14   <#macro link href='' class='' id='' name='' label='' title='' alt='' target='' params=''>
 15   <a href="${href}"<#if class!=''> class="${class}"</#if><#if id!=''> id="${id}"</#if><#if name!=''> name="${name}"</#if><#if target!=''> target="${target}"</#if><#if title!=''> title="${title}"</#if><#if alt!=''> alt="${alt}"</#if><#if params!=''> ${params}</#if>>
 16   <#if label !=''>${label}<#else><#nested></#if>
 17   </a>
 18   </#macro>