dropdownItem.ftl

 1   <#--
 2   Macro: dropdownItem
 3   
 4   Description: Generates an HTML list item element that serves as a dropdown menu item, with a specified class, href, target, title, ID, and parameters.
 5   
 6   Parameters:
 7   - class (string, optional): additional classes to add to the list item.
 8   - href (string, required): the hyperlink for the dropdown menu item.
 9   - target (string, optional): the target for the dropdown menu item.
 10   - title (string, optional): the title for the dropdown menu item.
 11   - id (string, optional): the ID for the list item.
 12   - params (string, optional): additional parameters to add to the HTML code.
 13   -->
 14   <#macro dropdownItem class='' href='' target='' title='' id='' params='' disabled=false>
 15   <li>
 16   	<a href="${href}" class="dropdown-item<#if class!=''> ${class}</#if> <#if disabled>disabled</#if>" title="${title}"<#if id!=''> id="${id}"</#if><#if params!=''> ${params}</#if><#if target!=''> target="${target}"</#if>>${title}</a>
 17   </li>
 18   </#macro>