sivaprasad9394
Occasional Collector

How to get the site store variable name inside format template in FS 5.1?

Jump to solution

Hello,

I have defined a variable Name called "ssNewsDetail" and value as "pageRef:news_detail_page" in Sitestore Variable definition.

When i accessed it inside section template it returns like only "pageref:news_detail".Here "_page" is missing.

SiteStoreVariable.png

Variable:ssNewsDetail

<!-- SiteStoreVariable: $CMS_VALUE(ssNewsDetail)$ -->

<!-- NewsDataSource: $CMS_REF(ssNewsDetail,contentId:newNewsId,abs:2)$ -->

output:

<!-- SiteStoreVariable: pageref:news_detail -->

<!-- SiteStoreVariable:  --> EMPTY RESULT

1. The output should be like <!-- SiteStoreVariable: pageref:news_detail_page --> buy why _detail is missing here?

I am using this variable "ssNewsDetail" in output channel for link template name called "lt_overlaylink_news"

$CMS_IF(isSet(ssNewsDetail) && !lt_entity.isEmpty)$$CMS_REF(ssNewsDetail, contentId:lt_entity.getDataset().getEntity().getValue("fs_id"),abs:setAbsolute)$$CMS_END_IF$

I just verified wheather "ssNewsDetail" is overridden some where inside template.the answer is NO.

Alternate Senario:

Variable:ssNewsDetailNew

<!-- SiteStoreVariable: $CMS_VALUE(ssNewsDetailNew)$ --> As metioned in the image above...

<!-- NewsDataSource: $CMS_REF(ssNewsDetailNew,contentId:newNewsId,abs:2)$ -->

output:

<!-- SiteStoreVariable: pageref:news_detail_page -->

<!-- NewsDataSource: /en/news/news_detail_page_127106.html -->

The output is correct <!-- SiteStoreVariable: pageref:news_detail_page_page -->

I am using this variable "ssNewsDetailNew" in output channel for link template name called "lt_overlaylink_news".

$CMS_IF(isSet(ssNewsDetailNew) && !lt_entity.isEmpty)$$CMS_REF(ssNewsDetailNew, contentId:lt_entity.getDataset().getEntity().getValue("fs_id"),abs:setAbsolute)$$CMS_END_IF$

Why this weired behaviour is happening here??


0 Kudos
1 Solution

Accepted Solutions
king
I'm new here

Dear Siva,

please try using the "dumpcontext()" method in combination with "$CMS_VALUE()$ to get a detailed overview of the context's content. A parameter specifies the separator, e.g. you could take a "<br/>" for an HTML line break.

An example can be found below:

http://www.e-spirit.com/odfs51/Template-development/Template-syntax/Instructions/CMS_VALUE/

When not having access to the ODFS here at the FirstSpirit community take the FirstSpirit help on your local/remote FirstSpirit installation.

Up to now, there seems to happen a value change in a deeper hierarchy level.

View solution in original post

0 Kudos
3 Replies
king
I'm new here

Dear Siva,

please try using the "dumpcontext()" method in combination with "$CMS_VALUE()$ to get a detailed overview of the context's content. A parameter specifies the separator, e.g. you could take a "<br/>" for an HTML line break.

An example can be found below:

http://www.e-spirit.com/odfs51/Template-development/Template-syntax/Instructions/CMS_VALUE/

When not having access to the ODFS here at the FirstSpirit community take the FirstSpirit help on your local/remote FirstSpirit installation.

Up to now, there seems to happen a value change in a deeper hierarchy level.

0 Kudos
pavone
I'm new here

Hello Siva,   

do you need further help or did Holger's reply already help you? If so, it would be great if you marked his reply as "correct answer" so that other community users find the solution easily. If you have already found a solution by yourself, it would be very kind of you, if you posted it here.

Best regards 

Tim

0 Kudos
sivaprasad9394
Occasional Collector

Hello,

Its a wrong setting for the site store variable. And we have to excuse as it was a typo that led to the problem.

Thank you.