在Magnolia 4.5.3中,我试图继承父页的阶段,如果没有为此定义。 Java类TemplatingFunctions
(暴露在freemarker中cmsfn
)提供了一种方法inherit(Node content)
,所以我想以下几点:cmsfn.inherit()似乎返回错误类型
[#if component??]
[@cms.component content=component /]
[#else]
[#assign inheritedContent = cmsfn.inherit(cmsfn.content([email protected])) /]
[@cms.component content=inheritedContent /]
[/#if]
但后来我得到一个错误:
The 'content' parameter must be a ContentMapModel and is a StringModel.
(6行我的例子)
为什么会发生这个错误,即我该如何解决这样的错误?
是的,类型是其中一个问题,但我不得不使用'新的ContentMap(节点)'来使它工作。 –