Matching on multiple attributes in one Curly statement??
This is an open discussion with 2 replies, filed under XSLT.
Search
<a href="{$root}/{$url-language}/{appear-on-pages/page[@handle !='hafan' and @id = current()/id]/item/@handle}?title={title/@handle}" title="llun o/image of - {title}">
you can use 'AND' and 'OR' in xpath predicates. i'm not sure if what i gave you is the exact functionality you needed but it at least illustrates the ability to match multiple predicates.
I was thinking of AND in my sleep. will try today, thanks.
EDIT
I created a variable in the entry matching template in the end.. matching ID's and switching the XPATH was the way to go.
so {/data/navigation/page[@id = $appear]/item/@handle}
and the variable was called appear
with this xpath: "/data/video-list/entry/appear-on-pages/page[@handle !='hafan']/@id"
This matches the first page that is selected in the selectbox link that isn't the home page (Hafan is welsh for Home).
Create an account or sign in to comment.
Hey ho, just trying to reference a part of my XML for it's id and handle in another part of my XML.. it's a multilingual thing... is something like this even possible?
I get an error so I know what I have isn't working, but is it possible that I have the syntax in the wrong place? Can I have predicates within predicates in html links?