But here two unclear things for me. Firstly: If I add Footer to tree, it will be visible in top menu. I don't need it. Secondly: How should I show items of Footer in rigth place?
1) Create a tick box on your page datatype such as "Show in Footer". You can then setup your XSLT code to filter for nodes that have this ticked. You then don't need to create a footer section in the tree.
2) If you want to create a seperate Footer section in the tree, then you need to add a field to those Nodes such as "Hide in Navi". Then modify your menu XSLT to remove anything with this field ticked.
Ianhoughton's way is surely one way to go, but I don't really think it's a nice solution to create content-pages if it's not content (like in pages to visit), like with your footer? I assume that the footer data will be textstrings, and that you'll output these in a div or ul? If yes, then I would recommend you to take a look at the Embedded Content package: http://our.umbraco.org/projects/backoffice-extensions/embedded-content
Then I would add this datatype to my top-node (usually "Home") and write a recursive XSLT/Razor-script, that always looks for this nodetypealias and outputs the textstrings.
The embedded content should be a part of Umbraco. I use it all the time. :)
It works - great! If you want to make it perfect, I would recommend to write a variable to get the ID for the footer-page by checking it's documenttype and not hardcoding the ID. This would make it more flexible and usable on other solutions. But that's a minor thing. Most importantly - it works! Yay! :)
Footer
Hi all
Stucture of my project
- Company profile
- cp_sub1
- cp_sub2
- cp_sub3
- Eco taxe
- et_sub1
- et_sub2
And I want to add footer with some items to my site, and this footer shouldn't be static. As I understand I should add new branch to tree:
- Company profile
- cp_sub1
- cp_sub2
- cp_sub3
- Eco taxe
- et_sub1
- et_sub2
- Road network
- rn_sub1
- rn_sub2
- Footer
- f1
- f2
But here two unclear things for me.
Firstly: If I add Footer to tree, it will be visible in top menu. I don't need it.
Secondly: How should I show items of Footer in rigth place?
Here are 2 ways I've achieved this in the past:
1) Create a tick box on your page datatype such as "Show in Footer". You can then setup your XSLT code to filter for nodes that have this ticked. You then don't need to create a footer section in the tree.
2) If you want to create a seperate Footer section in the tree, then you need to add a field to those Nodes such as "Hide in Navi". Then modify your menu XSLT to remove anything with this field ticked.
Thank You.
Hey Alexey!
Ianhoughton's way is surely one way to go, but I don't really think it's a nice solution to create content-pages if it's not content (like in pages to visit), like with your footer? I assume that the footer data will be textstrings, and that you'll output these in a div or ul? If yes, then I would recommend you to take a look at the Embedded Content package: http://our.umbraco.org/projects/backoffice-extensions/embedded-content
Then I would add this datatype to my top-node (usually "Home") and write a recursive XSLT/Razor-script, that always looks for this nodetypealias and outputs the textstrings.
The embedded content should be a part of Umbraco. I use it all the time. :)
/Berntsen
Thanks Berntsen.
I did it in such way:
1. I Add footer to tree as new branch. I know id of footer page (1070), so for to hide footer in top menu I add check to xslt:
<xsl:if test="@id != 1070">
2. Because I know id of footer page I can get all footer's child. I made macro:
<tr>
<xsl:for-each select="$footer/child::* [@isDoc and umbracoNaviHide != 1]">
<td class="item">
<a href="{umbraco.library:NiceUrl(@id)}">
<div>
<xsl:value-of select="@nodeName" />
</div>
</a>
</td>
<td class="separater">
<div> </div>
</td>
</xsl:for-each>
</tr>
Hi Alexey!
It works - great! If you want to make it perfect, I would recommend to write a variable to get the ID for the footer-page by checking it's documenttype and not hardcoding the ID. This would make it more flexible and usable on other solutions. But that's a minor thing. Most importantly - it works! Yay! :)
is working on a reply...