Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt Taylor 873 posts 2086 karma points
    Oct 23, 2010 @ 21:08
    Matt Taylor
    0

    Header & Footer Navigation - Best Practice

    I've been looking through the forum as I've been trying to figure out how best to implement the header and footer navigation on my Umbraco 4.0 site.

    Posts I've seen generally talk about creating separate document type properties, 'Show In Main Nav' & 'Show In Footer Nav' and then setting them for the pages you want.

    Is this really the best way to achieve this?

    Perhaps there's a clever way to structure the site to achieve this but like many posts I'm of the opinion that structures should flow natrually rather than around navigation.

    Thank you,

    Matt

     

     

     

  • Kim Andersen 1447 posts 2197 karma points MVP
    Oct 23, 2010 @ 21:27
    Kim Andersen
    0

    Hi Matt.

    Well, there are a lot of different ways you can achieve this. It depends on what you want to show in the footer. If you just want to show a link to every single page in your site down there, there's no need to put a "Show in footer nav"-property on your pages.Or if you want to show every page from level 4 and up, there's also no need of the property.

    But if you just want to show some special pages down there, I can see the benefit of having a property that tells if a page should be shown in the footer or not. Dpes it make sense so far?

    When talking about your main navigation, I'd rather put a property on the pages to mark if a page shouldn't be vissible in the main navigation. In general, most of the pages on the first level shall be shown in the main navigation. Almost all of the Umbraco sites I've come across have had a property (a true/false checkbox) called "umbracoNaviHide". If this box is checked the page will not be shown in the navigation.

    Just my 5 cent :)

    /Kim A

  • Matt Taylor 873 posts 2086 karma points
    Oct 24, 2010 @ 13:16
    Matt Taylor
    0

    Hi Kim,

    Yes that makes sense.

    It is just the top level pages that will make up the header & footer navigation.

    What put me off is adding two new properties to the master document type and then having them appear on loads of pages that are not applicable.

    Regards,

    Matt

  • Kim Andersen 1447 posts 2197 karma points MVP
    Oct 24, 2010 @ 13:34
    Kim Andersen
    0

    Ahh so you just want the pages on level 2 (or 3 maybe?) to show up in the navigation? If you just want to show all of the pages at one specific level, you can probably just use the predefined XSLT for top navigation. This XSLT will create an unordered list of links working as a menu by level. You can choose the level you want to show pages from. Then you can insert this macro in top and bottom of your page.

    If that's all you want to achieve there should be no need for adding two extra properties to all of your different document types.

    /Kim A

  • Matt Taylor 873 posts 2086 karma points
    Oct 24, 2010 @ 14:09
    Matt Taylor
    0

    Hi Kim,

    Yes it is the predefined XSLT for top navigation that I am using.

    But some of those top level pages need to go at the top and some at the bottom, not all of them and that's where the properties come in to specify which.

    Regards,

    Matt

  • Kim Andersen 1447 posts 2197 karma points MVP
    Oct 24, 2010 @ 15:57
    Kim Andersen
    0

    Yeah, well if that's the case, I think you need to go for the extra properties. Except if the nodes in the top and the nodes in the footer can be seperated in any other way. E.g. if they have two different document types, or something else can be used to seperate them.

    /Kim A

  • Matt Taylor 873 posts 2086 karma points
    Oct 24, 2010 @ 16:40
    Matt Taylor
    0

    Yes, a special document type for the top level pages didn't seem like the answer to me a while ago but now that I think about it I know that is the answer.

    It makes sense and is similar to what I have done in the past with another CMS.

    Thanks a lot for helping me work this out.

    Regards,

    Matt

  • Kim Andersen 1447 posts 2197 karma points MVP
    Oct 24, 2010 @ 16:54
    Kim Andersen
    0

    You are welcome Matt.

    As mentioned earlier, there are some different ways of solving the issue. If you go for different document types for the nodes, just take future maintenance in to consideration. If you some day want to move a link from the top to the footer, you'll have to delete the node and then create it again with the other document type. Maybe that's not the most fun part, but as long as you are aware of it before you decide, you'll be fine :)

    /Kim A

  • Matt Taylor 873 posts 2086 karma points
    Oct 24, 2010 @ 17:04
    Matt Taylor
    0

    Ah, my plan is to create a document type for the top level pages, typically called 'Landing Page' in my previous CMS work.

    I'll then add the two new properties to that doc type only. A combination of the single doctype and property values will acheive the result I think. :)

  • Kim Andersen 1447 posts 2197 karma points MVP
    Oct 24, 2010 @ 17:13
    Kim Andersen
    0

    Ohh yeah of course :)

    My bad. Thought that you where going to create some thing like this:

    - Products (HeaderDocType)

    - Blog (FooterDocType)

    - News (HeaderDocType)

    - About (FooterDocType)

    - Contact (HeaderDocType)

    etc...

     

    I get the point now :)

    /Kim A

  • Matt Taylor 873 posts 2086 karma points
    Nov 18, 2010 @ 12:38
    Matt Taylor
    0

    I've just come across the umbracoRedirect alias.
    Apparently if this alias is set on a page it will automatically redirect to another page.

    I was thinking this would be quite useful for building navigation.

    You could set up the following site structure:

    • Home
      • Page 1
      • Page 2
        • Terms & Conditions
      • Page 3
        • Contact Us
    • Shop
    • Footer (hidden from nav)
      • Terms & Conditions (redirects to page above)
      • Contact Us (redirects to page above)

    The top level navigation could be built as normal from the top level site structure and the footer navigation could be built from a macro that starts from the Footer node with those pages just redirecting to the proper ones.

    Does this sound OK? Any problems people can anticipate?

    Regards,

    Matt

  • Matt Taylor 873 posts 2086 karma points
    Sep 21, 2012 @ 15:04
    Matt Taylor
    0

    I decided to write up the approach I mentioned above.

    Just one of many ways to tackle it.

    http://www.dodarweb.com/blog/2012/flexible-footer-navigation-in-umbraco-using-umbracoredirect/

    Regards,

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft