Add external links
to old custom sites

Custom websites, created before Feb 9 2016, don't support external links in the menu

To add this funcionality, is necessary to modify some portions of code in the header.jsp file. Find this code:

<li>
    <a data-id="<%=item.getId()%>" data-type="<%=item.getType()%>" href="<%=item.getLink()%>" target="_self">
        <%=item.getLabel()%>
    </a>
</li>

And replace it with:

<li>
    <%    
    String link = item.getLink();
        if(!link.startsWith("http://") && item.getType().equals("LINK")){
            link = "http://" + link;
         }
        if(!item.getType().equals("LINK")){
            link = "/" + link;
        }
    %>
    <a data-id="<%=item.getId()%>" data-type="<%=item.getType()%>" href="<%=link%>" target="_self">
        <%=item.getLabel()%>
    </a>
</li>