This content has been marked as final. Show 5 replies
Sure. Is there a way I can get section name in java script?
Just do this in the page template:1 person found this helpful
<title><!--$wcmFragment("wcm", "[fragment content ID]", "[fragment ID]", "[snippet]")--></title>
And then just update the fragment to reflect what you want.
Alternatively, switch to Design mode and click on the placeholder (ie. region1). Then in the "Properties" window, update the "Title" property to what you want. You can also put idoc in there.
To get the section label in idoc, use <!--$sectionLabel = ssGetNodeLabel(siteId,nodeId)-->
Hope this helps.
Sure that provided an important clue. Here is what I did:
1) Tools -> Define Custom Section Properties, I added a new property "SectionNodeId".
2) For each of my section I configured this value to be equal to SectionId
3) I then went to the common page (that acts as a primary page in multiple sections) and clicked on a placeholder. That showed up "Title" property in the Properties window.
4) I put this "<!--$ssGetNodeLabel("<Hardcoded site id>",ssGetNodeProperty("SectionNodeId"))-->" in the Title.
It worked. Thanks for your help.