Integrating with Siteimprove
We are using SiteImprove - a service for finding spelling errors, broken links, etc. Its capable to deep linking into the cms so users can go directly from SiteImprove into Cascade to edit a page to correct errors. In order to do this, I need to add the page id into a meta tag.
I've tinkered all morning and googled a ton but haven't been able to get my velocity to work to pull the id. Looking at the xml output for the page, I see its in the id attribute for system-page but I'm an idiot when it comes to parsing xml with velocity.
I have a feeling its something similar to:
#set ( $pageid = $_XPathTool.selectSingleNode($contentRoot,
"/system-index-block/calling-page/system-page/id") )
Am I on the right track? Can anyone help?
btw, I know there is a another thread on this but it didn't answer my question and is closed: http://help.hannonhill.com/discussions/velocity-formats/3292-integr...
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by tarpley on 06 Feb, 2014 06:16 PM
Kept tinkering and answered my own question. Here's the velocity I came up with:
I wired this velocity format up to a template and matched it to an index block that pulls all the page info.
I'm sure there are more elegant ways to pull this off but since its so stinkin hard to find velocity examples and documentation, I figure this is better than nothing. Hope this helps someone.
Jeremy
Support Staff 2 Posted by Tim on 06 Feb, 2014 06:25 PM
Hey Jeremy,
Glad you were able to figure this out. You probably could have also done something like this as it is valid XPath:
Have a good one!Tim closed this discussion on 06 Feb, 2014 06:25 PM.
tarpley re-opened this discussion on 06 Feb, 2014 07:06 PM
3 Posted by tarpley on 06 Feb, 2014 07:06 PM
Awesome - didn’t know that, definitely more concise. Thanks Tim.
Support Staff 4 Posted by Tim on 06 Feb, 2014 07:27 PM
You bet! Take care, Jeremy.
Tim closed this discussion on 06 Feb, 2014 07:27 PM.