Copied to clipboard

Flag this post as spam?

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


  • Lee 95 posts 115 karma points
    Oct 28, 2011 @ 16:31
    Lee
    0

    Grouping pages

    Forgive me for asking a basic question.... but

    I am setting up a site that is divided up into groups of pages, for example

    Content

          Home

                      Pet owners

                                  Specialist Referral Service

                                              Cardiology

                                              Oncolgy

                                              etc

                                  Your visit

                                              Where are we?

                                              What to expect

                      Veterinary Professionals

                                  How to refer

                                              Who to contact

                                              Our team

                                              etc

     

    As you can see, I have the 'Home', 'Pet owners' and 'Veterinary Professionals' on the same level. I then have 'Specialist Referral Services' an 'Your vist' on the next level. They are grouped like this, but do not actually navigate to 'Specialist Referral Services' it will go to the first page under that grouping, in this case 'Cardiology'.

    I do not want it to have an introduction page.

    How am I best advised to set this up.

     

    Many thanks

  • Rich Green 2246 posts 4008 karma points
    Oct 28, 2011 @ 18:54
    Rich Green
    0

    Hey Lee,

    In the template for 'Specialist Referral Service' add the following code to redirect you to the first child node.

     

    <script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
    var current = umbraco.NodeFactory.Node.GetCurrent();
    if (current != null)
    {
    var child = current.ChildrenAsList.FirstOrDefault();
    if (child != null)
    {
    var url = child.Url;
    if (!string.IsNullOrEmpty(url))
    {
    Response.Redirect(url, true);
    }
    }
    }
    }
    </script>
     
    Rich

  • Rodion Novoselov 694 posts 859 karma points
    Oct 29, 2011 @ 20:12
    Rodion Novoselov
    0

    Hi, Lee. As far as I understand you're talking about quite a typical pattern that's described here: http://our.umbraco.org/wiki/how-tos/creating-content-folders

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies