Hello all!
I'm trying to change the behavior of language.jsp in the
corporate_portal_templates to display using css instead of tables. I've
changed the part that dealing with the table structure and it works fine.
But then I want to output the actual flag and I tried something like this:

    if (displayLink) {
        l++;
        displayTable = true;
        if (l > 1){
            sb.append(" | ");
        }
        Locale localeLangToDisplay =
LanguageCodeConverters.languageCodeToLocale(languageCode);
        String languageName =
localeLangToDisplay.getDisplayLanguage(localeLangToDisplay) + " [" +
localeLangToDisplay.getDisplayName() + "]";
%>
        <jahia:displayLanguageFlag  code="<%=languageCode%>"

href='<%=currentLanguageCode.equals(languageCode) ? "" :
jData.gui().drawPageLanguageSwitch(languageCode)%>'
                                    alt="<%=languageName%>"/>
    <%}

}
The jahia:displayLanguageFlag tag outputs html directly and the resulting
html page snip then becomes

        <a href="/jahia/Jahia/lang/en/pid/2"
      onMouseOut="MM_swapImgRestore()"

onMouseOver="MM_swapImage('flagImg90','','/jahia/jsp/jahia/engines/images/flags/en_on.gif',1)">
<img name="flagImg90" border="0" alt="English [engelska]"
src="/jahia/jsp/jahia/engines/images/flags/en_off.gif"></a>
    <div class="quicklink"></div>

And what I want to do is to have the link inside the div tag.

How can I get the html code for the flag to append to string buffer sb?
I tried reading the org.jahia.taglibs.button.displayLanguageFlagTag java
file but it doesn't seems like the easy way to go.

Thanks,
Christian

Reply via email to