selecting a node and it's children based on the name
Hi There,
I would like to create a secondary navigation menu based on certain node names and their children. Am I able to do this in a macro? If so can someone help me out with the syntax please?
I have a document type that is specifically for the top of my page that is called "popups". I want to only display this in certain sections on the site and hide it from the regular navigation at the same time? Currently all of the pages are appearing in the navigation. I realise I will need to create 2 macros for this. Does that make sense?
selecting a node and it's children based on the name
Hi There,
I would like to create a secondary navigation menu based on certain node names and their children. Am I able to do this in a macro? If so can someone help me out with the syntax please?
Thanks in advance.
Sean
To match immediate children of any document type by node name containing the string "fish", you want something like:
There are various extension functions you can use for better matching, like case insensitive matching and regular expression matching.
Give us a bit more detail about your structure and what you want and we'll come up with something useful! :o)
Hi Rob,
Thanks for the reply.
I have a document type that is specifically for the top of my page that is called "popups". I want to only display this in certain sections on the site and hide it from the regular navigation at the same time? Currently all of the pages are appearing in the navigation. I realise I will need to create 2 macros for this. Does that make sense?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!-- start writing XSLT -->
</xsl:template>
</xsl:stylesheet>
Aha, so the node name is the actual XML node name, the document type, not the text page name? Misunderstood, sorry?
So, in that case, to select just popups is obviously easy:
To get things that are NOT popups:
Is that what you're after?
is working on a reply...