I trying to create a set-up that allows for multiple blogs. Each blog will have it's own author section. When selecting an author for a blog article you should only be able to select an author for that specific blog. This is the xpath query that I'm using at the moment, it allows me to only select authors for that specific blog when creating a new post. However, when I try to update the author of a blog article it allows me to select from all authors.
$parent/../../child::*[BlogAuthorPage]
Hope that makes sense. Any help is appreciated. Thanks.
xpath query only working for create, not update
Hi,
I trying to create a set-up that allows for multiple blogs. Each blog will have it's own author section. When selecting an author for a blog article you should only be able to select an author for that specific blog. This is the xpath query that I'm using at the moment, it allows me to only select authors for that specific blog when creating a new post. However, when I try to update the author of a blog article it allows me to select from all authors.
$parent/../../child::*[BlogAuthorPage]
Hope that makes sense. Any help is appreciated. Thanks.
Managed to get it with this query. Probably not the most elegant solution, but seems to work.
$current/ancestor-or-self::[BlogPostsFolder]/child::[BlogAuthorPage]
Hi Michael,
Just to make sure anyone trying to copy/paste the XPath gets it correct, here's an optimised version:
(Yours were missing the asterisks in front of the predicate square-brackets - but they're not really necessary when you know the exact aliases)
/Chriztian
is working on a reply...