Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
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!