Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-1651

Add a different class to the active page in the breadcrumb

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1 M2
    • None
    • None
    • None

      I'd like that in the breadcrumb the current selection will look different.

      I did this adding to breadcrumb.java:
      /**

      • Name for the class of selected page
        */
        private String cssActPage;
        .....
        if (this.link)
        {
        out.print("<a href=\""); //$NON-NLS-1$
        out.print(request.getContextPath());
        out.print(page.getHandle() + "." + Server.getDefaultExtension());
        if (actpage.getHandle().equals(page.getHandle())) { out.print("\""); out.print(" class=\""); //$NON-NLS-1$ out.print(cssActPage); out.print("\""); out.print(">"); //$NON-NLS-1$ }

        else

        { out.print("\">"); //$NON-NLS-1$ }

      }
      .....

      I added first an attribute to the tld:
      ....
      <attribute>
      <name>cssActPage</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
      <description>Class for active page</description>
      </attribute>
      .....

        Acceptance criteria

              fgiust Fabrizio Giustina
              mariaelena maria elena milani
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD