PLEASE HELP!! How to get xsl-values from UNPUBLISHED nodes?
Hi,
I have a "Contact US" as a Child of "About Us". I don't want to show the "About US" in top navigation. So I am unpublishing the "About US". I have a ContactUS.xslt which reads some properties from the Contact Us page.
So you are using XSLT, the way that you can hide a menu item in your menu, is by add a property on your document type with the alias of umbracoNaviHide the datatype must be true / false, if you use one of the build in XSLT snippets, e.g List subpages from Currentpage. it looks like this:
And you must have an XSLT file that renders the menu items, on the level commission grants & reporting local plans in there in the for-each loop you need to add the string(umbracoNaviHide)!= '1' as the example above.
You need to add the umbracoNaviHide for the document type that makes the pages, for commission grants & reporting local plans and so on, and on document type that make the pages recourses and about us. I would say the umbracoNaviHide is alwas nice to have on every document type, so you can hide items, in navgations, therefor I always added it to a master document type.
PLEASE HELP!! How to get xsl-values from UNPUBLISHED nodes?
Hi,
I have a "Contact US" as a Child of "About Us". I don't want to show the "About US" in top navigation. So I am unpublishing the "About US". I have a ContactUS.xslt which reads some properties from the Contact Us page.
I am trying to do something like this:
<xsl:for-each select="umbraco.library:GetXmlNodeById(1102)">
<xsl:value-of select="mailingAddress" disable-output-escaping="yes" />
</xsl:for-each>
1102 is the Id for "Contact US" node. But since the parent is UNPUBLISHED. it returns an error.
Thanks
Sg
That no item with this id is published.
How can i get properties from unpublished nodes?
Hi sg,
So you are using XSLT, the way that you can hide a menu item in your menu, is by add a property on your document type with the alias of umbracoNaviHide the datatype must be true / false, if you use one of the build in XSLT snippets, e.g List subpages from Currentpage. it looks like this:
It´s the string(umbracoNaviHide) != '1' that decides if the menu item is visible or hidden. Documentation about umbracoNaviHide can you find here: http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbraconavihide
Maybe you could share your code, for the top navigation, if you have some code already.
Hope this helps,
/Dennis
Hi sg,
Okay could you try something like this:
Hope this helps,
/Dennis
And you must have an XSLT file that renders the menu items, on the level commission grants & reporting local plans in there in the for-each loop you need to add the string(umbracoNaviHide)!= '1' as the example above.
You need to add the umbracoNaviHide for the document type that makes the pages, for commission grants & reporting local plans and so on, and on document type that make the pages recourses and about us. I would say the umbracoNaviHide is alwas nice to have on every document type, so you can hide items, in navgations, therefor I always added it to a master document type.
Here is a video about working with master documentype http://umbraco.tv/videos/umbraco-v7/implementor/fundamentals/document-types/master-document-type/ and here are the basic about document types. http://umbraco.tv/videos/umbraco-v7/implementor/fundamentals/document-types/ These videos shows it in version 7 but it´s the same if you are usig an older version.
Hope this helps, and make sense, else keep asking and I will try to help you.
/Dennis
Thanks Dennis,
This helped. I was able to get it working using your suggestion!!
Thanks Shilpi
Hi sg,
Sorry for the late answer, but glad you got it work,
Could you please mark this a solved. You have a green tick for each post, just click on it for the post with the correct answer.
/Dennis
is working on a reply...