Aller au contenu principal

Creating Document Groups for specific Presentation channels (PDF)

Commentaires

5 commentaires

  • Zendesk API User
    Author: liam_davison - 11/20/2017 11:16

    I have solved my problem. It is necessary to split the templates into three templates - the header, the body and the footer.

    There is a #global.docgroup invocation to identify if the page is being generated as part of a Document Group. The "comment" in the Document Group can be used as an overall page title, though I haven't found out how to access the comment in the template yet.

    I'll need to build my own ContentCreator UI in order to provide access to Document Groups in the CC :smileysad:.

    Liam

    0
  • Zendesk API User
    Author: MichaelaReydt - 11/20/2017 13:26

    Hello Liam,

    did you answer your question by yourself (as you write you solved your problem) or do you need further help with this posting? If so could you describe your remaining problem?

    Best regards

    Michaela

    0
  • Zendesk API User
    Author: liam_davison - 11/21/2017 10:23

    Hello Michaela,

    My only question is the Document Group comment field available to use in templates? $CMS_VALUE(#docGroup.comment)$ (or #docGroup.getComment()) doesn't return any value.

    Thanks,

    Liam

    0
  • Zendesk API User
    Author: liam_davison - 11/22/2017 14:49

    In fact, I have losts of questions about $CMS_VALUE(#docGroup) - I really need to be able to access the underlying PageRef but can't get at it.

    #docGroup.childs returns a list of PageRefWrappers (not mentioned in the API documentation). But when I look at the DocumentGroup in the Beanshell console, the children of the DocGroup are all DocLinks.

    Here is a simplified version of my table-of-contents:

    $CMS_SET(renderChapter)$

      $CMS_FOR(chapter,chapters)$

    <li>

      $$CMS_VALUE(chapter.index +1)$ : $CMS_VALUE(chapter.getTarget(true))$

      $CMS_IF(!chapter.label.isEmpty())$

          $CMS_VALUE(chapter.label.convert2)$

      $CMS_ELSE$

        **unknown chapter**

      $CMS_END_IF$

    </li>

      $CMS_END_FOR$

    $CMS_END_SET$

    $CMS_SET(chapters,#docGroup.childs)$

    $CMS_VALUE(renderChapter)$

    $CMS_VALUE(chapter.getTarget(true))$ returns null.

    $CMS_VALUE(chapter.label)$ is not suffient for my needs. I need access to the PageRef in order to build my table of contents.

    How can I get the PageRefs from a #docGroup in a page template?

    Many thanks,

    Liam

    0
  • Zendesk API User
    Author: Peter_Jodeleit - 11/26/2017 19:58

    Hi Liam,

    #docGroup.childs returns a list of PageRefWrappers (not mentioned in the API documentation).

    You can use "chapter.node" to get the PageRef, but it's not guaranteed to be available in future versions.

    Please file a dedicated feature request to get a stable API for this.

    Peter

    0

Vous devez vous connecter pour laisser un commentaire.