How do I use xpath to exclude a certain folder?
I have an index block with a bunch of different indexed pages in it.
I also have another page, a base asset -- I don't want that base-asset page to show up in that index block, but I want users to use this base asset to create new pages that will be indexed.
I keep this base asset page inside of a folder called "/_internal"
I suspect that the best way to "hide" this base asset page from the index block would be to exclude the "/_internal" folder in my XPath statement.
How would I exclude the "/_internal" folder with an Xpath statement in velocity?
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 Ryan Griffith on 25 Aug, 2014 07:59 PM
Hi Eric,
You should be able to add the following to your XPath expression to make sure the _internal folder is not included:
Please let me know if you have any questions.
Thanks!
2 Posted by Ryan Griffith on 25 Aug, 2014 08:00 PM
Er, my apologies, Eric, I meant to use path and not name:
Please let me know if you have any questions.
Thanks!
3 Posted by Eric on 25 Aug, 2014 08:23 PM
This is the entire line of code that contains my xpath statement:
I can't get it to work. I suspect that the syntax is wrong.
4 Posted by Ryan Griffith on 25 Aug, 2014 08:29 PM
Hi Eric,
It looks like your XPath statement needs to be tweaked slightly. When you have a moment, give the following a try and let me know how it works out:
Please let me know if you have any questions.
Thanks!
5 Posted by Eric on 25 Aug, 2014 08:32 PM
Worked! Thank you. I am gaining a better understanding of xpath.
6 Posted by Ryan Griffith on 25 Aug, 2014 08:46 PM
Thank you for following up, Eric. I am glad to hear the new XPath did the trick.
I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.
Have a great day!
Ryan Griffith closed this discussion on 25 Aug, 2014 08:46 PM.