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

Improve tag libraries

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 2.01
    • None
    • taglibs
    • None

    Description

      The Magnolia tag libraries need aligning much closer to JSTL (/EL).

      In particular <cms:out> should be depreciated in favour of <c:out>. <c:out> offers the ability to escape XML entities which is invaluable if writing out XHTML or XML pages. None of the Magnolia tags seem to offer the ability to escape XML.

      For example the following is not desirable:

      <c:set var="lineAbove"><cms:out nodeDataName="lineAbove"/></c:set>

      It would be much better to expose the current node data as a bean, so we could do the following:

      <c:if test="${currentNode.lineAbove}">.....</c:if>

      A solution may be to create a <cms:getCurrentNode> tag which exposes a bean representing the current node being iterated in the page context:

      <cms:getCurrentNode var="currentNode"/>

      <c:if test="${!empty currentNode.title}">
      <c:out value="${currentNode.title}"/>
      </c:if>

      This would be far more compliant and tidier than the current solution and also enable us to produce XHTML compliant pages!

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              fgiust Fabrizio Giustina
              hugol Hugo Lumsdon
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Task DoD