Index: src/main/java/info/magnolia/cms/taglibs/util/SimpleNavigationTag.java =================================================================== --- src/main/java/info/magnolia/cms/taglibs/util/SimpleNavigationTag.java (revision 19163) +++ src/main/java/info/magnolia/cms/taglibs/util/SimpleNavigationTag.java (working copy) @@ -117,6 +117,16 @@ private static final String CSS_LI_OPEN = "open"; //$NON-NLS-1$ /** + * Css class added to first li in ul. + */ + private static final String CSS_LI_FIRST = "first"; //$NON-NLS-1$ + + /** + * Css class added to last li in ul. + */ + private static final String CSS_LI_LAST = "last"; //$NON-NLS-1$ + + /** * Page property: navigation title. */ private static final String NODEDATA_NAVIGATIONTITLE = "navTitle"; //$NON-NLS-1$ @@ -221,6 +231,11 @@ private String contentFilter = ""; + /** + * Flag to set if the first and last li in each ul should be marked with a special css class + */ + private boolean markFirstAndLastElement = false; + /** * The start level for navigation, defaults to 0. * @jsp.attribute required="false" rtexprvalue="true" type="int" @@ -323,6 +338,15 @@ } /** + * If set to true, a "first" or "last" css class will be added to the list of css classes of the + * first and the last li in each ul. + */ + public void setMarkFirstAndLastElement(boolean flag) { + System.out.println("setMarkFirstAndLastElement(): "+flag); + markFirstAndLastElement = flag; + } + + /** * @see javax.servlet.jsp.tagext.Tag#doEndTag() */ public int doEndTag() throws JspException { @@ -404,7 +428,6 @@ if (children.size() == 0) { return; } - out.print("