The velocity template engine is tightly integrated with Java based multi channel publishing CMS polopoly:
There are some really cool ways to get data in velocity from polopoly. In the article context we can easily get article's parent page using the following line:
There are some really cool ways to get data in velocity from polopoly. In the article context we can easily get article's parent page using the following line:
#set($parentObj = $tool_domain.getModel($content.parentId))
Now to get the selected main column teaser layout we could easily do the following:
$parentObj.pageLayout.selected.mainColumnTeaserLayout.value
We could do it using one line like below:
$tool_domain.getModel($content.parentId).pageLayout.selected. mainColumnTeaserLayout.value
Comments
Post a Comment