G
Grant Merwitz
Hi, i'm not sure if this is the appropriate topic.
But here goes:
I am currently bulding a site menu from a xml file.
I have an attribute that indicates whether an option is active or not
"isactive=true/false"
Now using xpath it is easy to filter this out:
Xpath="MainBar/Section[@isactive="true"]
Now, i want to add a new attribute saying "isadmin=true/false", and this
will only display these values if an admin is logged in,
Now i'm struggling to find how to hide these if an admin is NOT logged in.
This attribute will not be there if this is a NON admin menu option.
I.e.:
<Section name="Option1" />
<Section name="Option2" isadmin="true" />
Now, how do I filter out the admin options using XPath.
(show nodes where the isadmin attribute is not present)
I've tried the following with no success:
Xpath="MainBar/Section[@isadmin=""]
Xpath="MainBar/Section[@isadmin=null]
I've googled around with no success,
Is there a way to say "where this attribute is not present"?
I don't want to add an "isadmin=false" to every node applicable.
TIA for any help
But here goes:
I am currently bulding a site menu from a xml file.
I have an attribute that indicates whether an option is active or not
"isactive=true/false"
Now using xpath it is easy to filter this out:
Xpath="MainBar/Section[@isactive="true"]
Now, i want to add a new attribute saying "isadmin=true/false", and this
will only display these values if an admin is logged in,
Now i'm struggling to find how to hide these if an admin is NOT logged in.
This attribute will not be there if this is a NON admin menu option.
I.e.:
<Section name="Option1" />
<Section name="Option2" isadmin="true" />
Now, how do I filter out the admin options using XPath.
(show nodes where the isadmin attribute is not present)
I've tried the following with no success:
Xpath="MainBar/Section[@isadmin=""]
Xpath="MainBar/Section[@isadmin=null]
I've googled around with no success,
Is there a way to say "where this attribute is not present"?
I don't want to add an "isadmin=false" to every node applicable.
TIA for any help