-
New Feature
-
Resolution: Duplicate
-
Neutral
-
None
-
4.5.3
-
None
-
-
Empty show more show less
Hi,
It could be that we are overlooking something but we cannot seem to find an easy way to get to a (page) node from the UUID anymore in the new Magnolia templating API / taglibs. Neither the FTL nor the JSP version. Can this functionality be added to the taglibs? cmsfn:link seems to be the only function that still takes a UUID.
Situation: we store internal links as UUID fields (not paths). In the old (pre 4.5) API it was easy to retrieve the node that the link points to in order to get this node's children etc. In the new API (FTL example below) we now have to get the link and then strip the context path and extension from it and use the resulting path to get the node. There must be an easier way?
[#assign contextlink = cmsfn.link('website',content.start?string)] [#assign serviceMenuParentPath = (contextlink?replace("."+state.extension,""))?replace(ctx.contextPath,"")] [#assign serviceMenuParentNode = cmsfn.content('website',serviceMenuParentPath)] [#if serviceMenuParentNode?has_content] <ul class="nav"> [#list cmsfn.children(serviceMenuParentNode) as serviceMenuNode] [#assign serviceMenuPage = cmsfn.asContentMap(serviceMenuNode)] [#assign serviceMenuPageLink = cmsfn.link(serviceMenuPage)!] [..]
Also reported in SUPPORT-1448.
- duplicates
-
MAGNOLIA-4400 templating: introduce a possibility to get node by identifier
- Closed