rbitdd
Returning Responder

reading values from page-template in Navigation / PageGroup

Jump to solution

Hello Community,

in my navigation-function I show some HTML-Code in addition to a value in the page-template.

Now I want to use this code in the page-group again.

The problem ist, that #nav.ref in these both functions is of different datatypes and the function PageGroup is inadequately documented so far.

In my navigation I used this code:

$CMS_SET(set_ref, #nav.ref)$

$CMS_SET(set_page, set_ref.getPage())$

$CMS_SET(set_data, set_page.getData())$

$CMS_SET(set_formData, set_page.getFormData())$

$CMS_IF(set_data.get("pt_new_icon") != null && set_formData.get(#global.language, "pt_new_icon").get() > #global.now)$

HTML-code here...

$CMS_END_IF$

The problem is, that the second line - due to the fact that getPage doesn't exist - won't work.

#nav.ref is of the datatype  de.espirit.firstspirit.generate.functions.PageGroupFunctionImpl$PageGroupElement, to which I can't find in the documentation.

Can anybody help me?

Best regards.

D.

1 Solution

Accepted Solutions

Hallo,

man kann mit #nav.ref.node an einen ContentProducer gelangen.

Von diesem aus kommt man dann auch an die jeweilige Seite:

#nav.ref.node.page

Viele Grüße

Rouven

View solution in original post

3 Replies
rbitdd
Returning Responder

Hat niemand einen Tipp für mich?

0 Kudos

Hallo,

man kann mit #nav.ref.node an einen ContentProducer gelangen.

Von diesem aus kommt man dann auch an die jeweilige Seite:

#nav.ref.node.page

Viele Grüße

Rouven

rbitdd
Returning Responder

Changing these lines

$CMS_SET(set_ref, #nav.ref)$
$CMS_SET(set_page, set_ref.getPage())$

to

$CMS_SET(set_node, #nav.ref.node)$
$CMS_SET(set_page, set_node.getPage())$

works fine. Thanks a lot. Smiley Happy

0 Kudos