Aller au contenu principal

How to get the label value of the inpage navigation templates added?

Commentaires

2 commentaires

  • Zendesk API User
    Author: felix_reinhold - 7/25/2019 9:04

    Hello SIva,

    I don't really understand your problem because you already have the working code in your example. If you want to display the label defined in the FS_LIST use section.label, if you want to use the displayname of the section then use pageSection.getDisplayName(language):

    Sets the headline to the label defined in the FS_LIST              

    $CMS_FOR(section, pt_toc)$

        $CMS_FOR(pageSection, #global.page.children(class("de.espirit.firstspirit.access.store.pagestore.Section"), true))$

          $CMS_IF(section.uid.equals(pageSection.name))$

            $CMS_SET(set_headline, section.label)$

            $CMS_VALUE(renderTocEntry, default:"")$                                        

                $CMS_SET(void, #for.BREAK)$

            $CMS_END_IF$

        $CMS_END_FOR$

    $CMS_END_FOR$

    Sets the headline to the display-name of the section:

    $CMS_FOR(section, pt_toc)$

        $CMS_FOR(pageSection, #global.page.children(class("de.espirit.firstspirit.access.store.pagestore.Section"), true))$

          $CMS_IF(section.uid.equals(pageSection.name))$

            $CMS_SET(set_headline, pageSection.displayName(#global.language))$

            $CMS_VALUE(renderTocEntry, default:"")$                                        

                $CMS_SET(void, #for.BREAK)$

            $CMS_END_IF$

        $CMS_END_FOR$

    $CMS_END_FOR$

    Both works for me.

    Best regards

    Felix

    0
  • Zendesk API User
    Author: sivaprasad9394 - 7/25/2019 9:25

    Hello Felix,

    Thank you for your reply. Yea Its something like caching issue.

    $CMS_SET(set_headline, section.label)$ works fine.

    Regards,

    Siva

    0

Vous devez vous connecter pour laisser un commentaire.