Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Display links for Pages set with browser DCR
Matias
Hello,
A user creates a DCR that contain links to pages inside a livesite site, which were selected using the browser item.
The saved value looks like this:
/sites/mySite/test/page124.page
As you see, it appends the "/sites/mySite/" to the saved page.
This does not work well with the $PAGE_URL token. Also, in my XSL, there is no way for me to figure out the site name (to do a substring).
I would hate to have to hard code it in my xsl.
Is there any other way do this without a substring?
Find more posts tagged with
Comments
Rick Poulin
I think whether you do it in a hidden DCR field with FormAPI or in your component XSL, you'll still be cleaning the path out of the value using string parsing. I'd say build yourself a reusable XSL template that you can call when needed. That template would only alter the value if it starts with "/sites" and then use a combination of index-of and substring to rip out the "/sites/.*/" and ".page", so that you can put the result in $PAGE_LINK[blah]