Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.3.1
-
None
-
-
Empty show more show less
Description
The paragraphs 'stkTextImage' and 'stkLinkList' include the macro tocMarkup.ftl:
include "/templating-kit/paragraphs/macros/tocMarkup.ftl"/
The macro tries to read out the pages renderable definition, but does that wrong:
assign intro = model.parent.def.mainArea.intro
this works as long the parent model of the paragraph is a page's model.
But when the paragraph is a subparagraph, the call model.parent will return a renderable definition of a paragraph and not of a page.
the correct solution is:
assign rootDef = model.root.def!false
if rootDef.mainArea?if_exists
assign showTOC = rootDef.mainArea.intro.showTOC!false
else
assign showTOC = false
/#if
assign siblings=mgnl.siblings(content)
if showTOC
assign id='id="jump' + (siblings.index + 1) + '"'
else
assign id=""
/#if
Checklists
Attachments
Issue Links
- is causing
-
MGNLSTK-668 tocMarkup.ftl crashes on call
-
- Closed
-