Search the FirstSpirit Knowledge Base
Hello,
I am trying to assign some value to the $CMS_SET(variable) and rendering the variable inside the $CMS_VALUE(variable).But it is empty values.
Why this behaviour is happening?
$CMS_SET(setOverlayLinkNewHeadline)$$CMS_VALUE(content.stage_overlay_headline,default:"")$$CMS_END_SET$
<wcs:overlayLinkHeadline><![CDATA[$CMS_VALUE(setOverlayLinkNewHeadline,default:"")$]]></wcs:overlayLinkHeadline>
<!--setValue(content.stage_overlay_headline): $CMS_VALUE(content.stage_overlay_headline)$-->
<!--setValue(setOverlayLinkNewHeadline): $CMS_VALUE(setOverlayLinkNewHeadline)$-->
Output in the xml file:
<!--setValue(content.stage_overlay_headline): This is the test OverlayHeadLine-->
<!--setValue(setOverlayLinkNewHeadline): -->
Why here setOverlayLinkNewHeadline is null and empty value?if i use $CMS_VALUE(content.stage_overlay_headline)$ this it is working and displaying the headline properly.
thanks,
Siva
Hi Siva,
I don't get the context where you use setOverlayLinkNewHeadline exactly. If you are inside a table template (table templates are like section templates but the data behind the form is coming from a database record) you can not directly refer to database columns (except some rare occasions). You must use the form element's name which represents the column.
So, let's say I have a column myText inside a table. In the mapping tab I specify that this column maps against the form elment with name tt_my_text. Then I could do the follwoing in the HTML channel
$CMS_SET(setOverlayLinkNewHeadline, tt_my_text)$
Later I could output the value of setOverlayLinkNewHeadline like this
$CMS_VALUE(tt_my_text)$
Don't think that the number of schemas matter in this case or you did not tell us all we need to know.
Best regards
Marian Zaplatynski
Hello Siva,
I can't find any mistakes.
Where comes "content.stage_overlay_headline" from? Which FS version do you use?
Best regards
Jan
Hello Jan-Philipp,
I am generating an lap_feed_news_bgn_UPDATE.xml file inside the atomfeed format template.
If render the setOverlayLinkNewHeadline inside the xml value ,It always shows empty.
If i render like content.stage_overlay_headline means it is fetching the db column values and displaying the entered text properly.
<wcs:overlayLinkHeadline><![CDATA[$CMS_VALUE(content.stage_overlay_headline,default:"")$]]></wcs:overlayLinkHeadline>
Please refer the images,
Thank you,
Siva
Hi Siva,
is there a reason why you don't use
$CMS_SET(setOverlayLinkNewHeadline)$$CMS_VALUE(stStageOverlayHeadline,default:"")$$CMS_END_SET$
?
Best regards
Jan
Hello Jan-Philipp,
Thank you for your reply.
Its a testing content. I just declared in the top of the page like ,
$CMS_SET(setOverlayLinkNewHeadline,"")$ and tried
$CMS_SET(setOverlayLinkNewHeadlinenew, content.stage_overlay_headline)$ |
But no use..its testing purpose added....
I have done the mapping for the only one Database Schema.
in my project i have almost 64+ Schemas...For the initial version i am working for only one DB schema.later point of time i will implement for all the 64+ DB schema Templates.Do you think this could cause the problem??
Please refer the images,
Thank you,
Siva
Hi Siva,
I don't get the context where you use setOverlayLinkNewHeadline exactly. If you are inside a table template (table templates are like section templates but the data behind the form is coming from a database record) you can not directly refer to database columns (except some rare occasions). You must use the form element's name which represents the column.
So, let's say I have a column myText inside a table. In the mapping tab I specify that this column maps against the form elment with name tt_my_text. Then I could do the follwoing in the HTML channel
$CMS_SET(setOverlayLinkNewHeadline, tt_my_text)$
Later I could output the value of setOverlayLinkNewHeadline like this
$CMS_VALUE(tt_my_text)$
Don't think that the number of schemas matter in this case or you did not tell us all we need to know.
Best regards
Marian Zaplatynski
Hello Siva,
do you need further help or did the given answers already help you? If so it would be great if you mark the "correct answer".
If you found a solution by yourself it would be very kind of you if you post it here.
Best regards
Michaela
Hello Both,
This issue can be closed.Implementation is on hold.
Thank you for your reply.This issue should be closed some what earlier.But i forgot it.
Regards,
SIva