I have installed uBlogsy to have a blog on the website which have some documenttypes uBlogsyContainerPage and uBlogsyPage.. in the original site I have a document type Page for each standard text page.
So I want the exclude these uBlogsyContainerPage and uBlogsyPage from navigation, but when I do this, they also hide Page documenttype pages from navigation.
So it seems that the hide menutiems which contains some of the same name like Page in the end?
These part is in the xslt file:
<xsl:with-param name="menuItems" select="$Navigation.rootNode/ancestor-or-self::* [@level=number($Navigation.fromLevel - 1)]/* [@isDoc and not(contains($Navigation.ignoreDocumentTypes, name())) and ( ( $Navigation.isSitemap != '1' and string(./umbracoNaviHide) = '0' ) or ( $Navigation.isSitemap = '1' and string(./umbracoSitemapHide) = '0' ) )]" />
<xsl:variable name="childMenuItems" select="./* [@isDoc and not(contains($Navigation.ignoreDocumentTypes, name())) and ( ( $Navigation.isSitemap != '1' and ( string(./umbracoNaviHide) = '0' or string(./umbracoNaviHide) = '0' ) ) or ( $Navigation.isSitemap = '1' and (string(./umbracoSitemapHide) = '0' or string(./umbracoSitemapHide) = '' ) ) )]"/>
No, I haven't find a solution right now.. I could use Hide from navigation (umbracoNaviHide), but I might use some of the blog pages in the navigation, so it won't be the best solution..
Later I will try to write the check with the doctype alias directly in the xslt file, to see if it might be a problem with the ignoreDocumentTypes parameter or what cause this bug..
Does the contains function check on the whole string or only a part of it?
The valuesuBlogsyContainerPage and uBlogsyPage affect Page doctype in the navigation. So it seems to that it match some of the string and therefore also hide the standard pages.
It's certainly the contains thingy, which is too greedy in your case.You might be able to split the commalist and use the individual tokens for a compare.
When the xslt loop through the nodes and get a node which use Page as doc type and the ignoreDocumentTypes has a value TabPage it returns true.. and some other cases as well, when the as document type name match a part of another doc type name in ignoreDocumentTypes..
Problem with ignoreDocumentTypes parameter
Hi..
I have noticed a small problem with the ignoreDocumentTypes parameter in the navigation fra the starterkit.
I have inserted the macro with these parameters:
I have installed uBlogsy to have a blog on the website which have some documenttypes uBlogsyContainerPage and uBlogsyPage.. in the original site I have a document type Page for each standard text page.
So I want the exclude these uBlogsyContainerPage and uBlogsyPage from navigation, but when I do this, they also hide Page documenttype pages from navigation.
So it seems that the hide menutiems which contains some of the same name like Page in the end?
These part is in the xslt file:
/Bjarne
Hi Bjarne,
Yes, it's the contains part. Did you find a solution? There may be others that would like a fix on that.
/Rune
Hi Rune..
No, I haven't find a solution right now.. I could use Hide from navigation (umbracoNaviHide), but I might use some of the blog pages in the navigation, so it won't be the best solution..
Later I will try to write the check with the doctype alias directly in the xslt file, to see if it might be a problem with the ignoreDocumentTypes parameter or what cause this bug..
Does the contains function check on the whole string or only a part of it?
The values uBlogsyContainerPage and uBlogsyPage affect Page doctype in the navigation. So it seems to that it match some of the string and therefore also hide the standard pages.
/Bjarne
It's certainly the contains thingy, which is too greedy in your case.You might be able to split the commalist and use the individual tokens for a compare.
/Rune
Hi Rune
When the xslt loop through the nodes and get a node which use Page as doc type and the ignoreDocumentTypes has a value TabPage it returns true.. and some other cases as well, when the as document type name match a part of another doc type name in ignoreDocumentTypes..
I think there is a bit more work to get it working with a comma separated list.. e.g. here: http://stackoverflow.com/questions/8500652/comma-separated-string-parsing-xslt-to-for-each-node substring-before and substring-after is used..
But for now I solved it with help from Chriztian Steinmeier: http://our.umbraco.org/forum/developers/xslt/33507-Hide-pages-with-specific-doc-types
Instead of a comma separated list I have this:
And then in xslt changed these two lines from name() to concat('|', name() ,'|')
/Bjarne
Thanks. I will see if I can implement it as standard in the starter kit. Should be a good addition.
/Rune
is working on a reply...