Copied to clipboard

Flag this post as spam?

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


  • Janet Kirklen 102 posts 212 karma points
    Sep 13, 2010 @ 23:05
    Janet Kirklen
    0

    .Net User Control Navigation vs XSLT

    I'm new to Umbraco and when it comes to navigation an implementing a site structure I think I might be missing someting. 

    I have a .Net User control that I've used on other sites that creates my site navigation.  I've created a macro for it and I'm able to pass parameters to it just fine. I'm wondering if this is not a good strategy becuase the problem I am running into has to do with my site structure.  I want a /products subfolder.  Even though I've created that structure in my Document Types and Content pages, I am not getting a products subfolder.  All my content pages are flat (in the same folder). 

    In researching a solution I see that almost all the discussion on the forums related to navigation and site structure talks about XSLT.  Hmmmm, are there resons not to use my user control and use the Umbraco XSLT navigation macros?  Did I miss that video?

    Is there a way to create this folder structure and still use my .Net Navigation user control? 

    Some basic pros/cons would be really helpful.

  • Janet Kirklen 102 posts 212 karma points
    Sep 13, 2010 @ 23:22
    Janet Kirklen
    0

    I found a partial answer to my question in this post by Ploug Hansen.  Seeing the subfolder in the URL is controled by a flag in the web.config.  I made this change and it worked.

    http://our.umbraco.org/forum/using/ui-questions/10721-Site-structure-reflected-in-URLs

    I would still like to know if there are some advantages to using the Umbraco built-in XSLT navigation controls.  Would I be better off using that in my projects?

     

  • Sascha Wolter 615 posts 1101 karma points
    Sep 14, 2010 @ 00:19
    Sascha Wolter
    0

    Hi Janet,

    great that you found a solution to your immediate issue so quickly. :)

    As to your other question: I don't think there are 'real' advantages or disadvantages for either case, assuming of course you are accessing the cached nodes instead of the database in your custom controls (e.g. by using Node instead of Document). Personally I like to use Xslt better for easy and straightforward tasks of one or two pages length and not too much logic in it, which will probably be the case with your navigation. With more complex tasks it's probably 50/50 for me.

    Best, Sascha

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Sep 14, 2010 @ 08:31
    Aaron Powell
    2

    I'd go with either XSLT or Python for a navigation control rather than .NET. .NET has a lot of overhead for navigation (sitemap provider, etc) that a small scrpt can do a better job of.

    Yes, marvel at the recommendation of mine to use XSLT :P

Please Sign in or register to post replies

Write your reply to:

Draft