Magnolia 4.5.3 では、何も定義されていない場合、親ページのステージを継承しようとしています。Java クラスTemplatingFunctions
( cmsfn
freemarker のように公開) は methodinherit(Node content)
を提供するので、次のことを試しています。
[#if component??]
[@cms.component content=component /]
[#else]
[#assign inheritedContent = cmsfn.inherit(cmsfn.content(state.mainContent.@handle)) /]
[@cms.component content=inheritedContent /]
[/#if]
しかし、その後エラーが発生します:
The 'content' parameter must be a ContentMapModel and is a StringModel.
(私の例では6行目)
このエラーが発生する理由、つまり、このようなエラーを解決するにはどうすればよいですか?