How to get the site store variable name inside format template in FS 5.1?
Author: sivaprasad9394
Publication Date: 9/3/2014 13:48
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.

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??
Tags: sitestore, variable
-
Author: king - 9/5/2014 11:34
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
Please sign in to leave a comment.
Comments
1 comment