Actually Eddie, ignore me! I did that quickly and didn't look at your XPath - I think you'll find Thijs is much closer to the mark. The new schema does indeed use the doctype alias instead of 'node'. The code in the square brackets does stand though - it's what you need to 'filter' your selection (isDoc ensures that just content nodes are returned, and the other part ensures just the nodes marked to show in footer are returned).
Sorry forgot to mention that the showInFooter true/false element is set in a master document type (alias of 'master'). Do I need to add the alias to the xpath?
I'm trying to create a footer for my site but I'm having difficulty. I'm new to umbraco so hopefully one of you can help me.
So far I have my XSLT and the show in footer property but when I check it, nothing seems to happen for me. I have used some of the XSLT from above and this is what it looks like:
I assume this is the version of umbraco I'm running. I was however having an issue a while ago with a .NET user control and I had to compile with 3.5 rather than 4.
Here's my old thread and the solution I tried if you would like to see what I did:
Hi Stephen, I'm not sure you answered the part "is there a 'showInFooter' property of type 'True/False' on the document type you want to appear in the footer"?
You can check your assumptions by opening (on the server) the file in App_Data\umbraco.config , it's the XML cache file. This would allow you to browse the nodes and their attributes/properties.
Show in Footer
Hi All,
Just starting to move things over to the new schema. I had an old xslt which showed allowed the user to show/hide a page in the footer menu.
The old xslt is:
Have changed the following line, but the when the property is checked the page does not show.
<xsl:for-each select="$currentPage/ancestor-or-self::node/descendant-or-self::node/* [@isDoc][string(showInFooter) = '1']">
I'm sure it's somthing simple, just need to get use to the new syntax.
Thanks
Eddie
Hi Eddie,
Try:
A node is no longer called "node", it's called whatever the document type alias is. So it would become something like:
The XPath you're using is a bit confusing though. I would suggest trying something like:
Edit: updated "string(data[@alias = '<nodeTypeAlias>'])" to "string(<nodeTypeAlias>)".
Actually Eddie, ignore me! I did that quickly and didn't look at your XPath - I think you'll find Thijs is much closer to the mark. The new schema does indeed use the doctype alias instead of 'node'. The code in the square brackets does stand though - it's what you need to 'filter' your selection (isDoc ensures that just content nodes are returned, and the other part ensures just the nodes marked to show in footer are returned).
Hi Dan and Thijs,
Thanks for your quick replies,
Sorry forgot to mention that the showInFooter true/false element is set in a master document type (alias of 'master'). Do I need to add the alias to the xpath?
Thanks,
Eddie
Hi Guys,
Ignore last post, Thijs you solution worked a treat thanks.
Eddie
Hey guys,
I'm trying to create a footer for my site but I'm having difficulty. I'm new to umbraco so hopefully one of you can help me.
So far I have my XSLT and the show in footer property but when I check it, nothing seems to happen for me. I have used some of the XSLT from above and this is what it looks like:
I have then added the following to my master page, in the position I want my footer to appear:
When I go to all my page properties and select show In Footer nothing seems to happen.
I'm probably doing something very silly, anybody got any ideas?
Hi Stephen, first a couple of checks:
When you don't know, but you didn't upgrade and you are using version 4.5+, it's probably the new schema.
If that's the case, I don't know why it isn't working, since the XPath seems correct, provided:
You could try and see what is actually returned from your XPath using
This instead of (or preceding) the rest of the contents of your current <template match="/" />
Hi Thijs,
Thank you for your reply,
I have just recently installed umbraco around 3-4weeks ago. I just checked the web config file and it says:
I assume this is the version of umbraco I'm running.
I was however having an issue a while ago with a .NET user control and I had to compile with 3.5 rather than 4.
Here's my old thread and the solution I tried if you would like to see what I did:
http://our.umbraco.org/forum/getting-started/questions-about-runway-and-modules/15896-Net-User-Control?p=0
Could this be why I am having issues now?
Also when messing around with the XSLT I can see some items in the footer when I put "!= 1"
I can see the my footer regardless of having show in footer selected or not.
Sorry for such a silly question but where do i place <xsl:copy-of select="<XPATH"/> in order to see what is returned?
Hi Stephen, I'm not sure you answered the part "is there a 'showInFooter' property of type 'True/False' on the document type you want to appear in the footer"?
You can check your assumptions by opening (on the server) the file in App_Data\umbraco.config , it's the XML cache file. This would allow you to browse the nodes and their attributes/properties.
And I meant something like this (partial XSLT):
Hi Thijs,
I followed your instructions and some nodes in the umbraco config file have:
While others have
I then followed the suggested XSLT code but it did not return anything
Hi Stephen,
Unless I'm totally wrong, I think you need to take case-sensitivity (?spelling) into account. "showInFooter" is not the same as "ShowInFooter".
Hi Thijs,
Just want to say thank you so much for the help! you were right about the case sensitive cannot believe I did something that stupid!
Once again thanks!
It's not stupid, you just had to experience it the hard way. Now you will never forget! Glad I could be of help.
is working on a reply...