dynamic side navigation

William Collins's Avatar

William Collins

31 Jul, 2015 09:12 PM

We’re looking to improve our side navigation by generating sections and ordering different assets under those sections. I’ve attached a sample of what we want to achieve.

[cid:55E576E5-DA6A-47C3-902A-E7B5FD42B153]

In velocity, we are currently uses the sidebar to grab any children and sibling assets from the parent folder. We use the parent folder’s display name for the h1 (yes, we’re aware this was a mistake) and then build the silblings based on their order. But, like I mentioned earlier, we need something more flexible, where we can add sections. How would we go about this in Velocity. Any help would be appreciated.

William Collins

  1. 1 Posted by William Collins on 31 Jul, 2015 09:17 PM

    William Collins's Avatar

    Here is a sample of what we currently do

  2. 2 Posted by Greg on 13 Aug, 2015 02:49 PM

    Greg's Avatar

    I'm trying to do something similar (I think) with our department. We want to have all our parent folders and children visible in the side navigation bar at one time. We would like the children pages to be indented under the parent folder in the list. I'm not sure how to do this and hope it is also what you are asking.

    Please see attached. "Institutional Assessment" and "Strategic Planning" would be folders, and the children are the subpages. We want them all visible at once though, without the navigation changing everytime a user "drills down" into the site.

  3. 3 Posted by Lisa McWilliams on 13 Aug, 2015 04:13 PM

    Lisa McWilliams 's Avatar

    Hi William,

    Where would these other sections come from? You mentioned that currently you do the current folder and the children and sibling assets. So where would you want the additional sections to come from?

    Thanks,

    Lisa

  4. 4 Posted by Lisa McWilliams on 13 Aug, 2015 04:23 PM

    Lisa McWilliams 's Avatar

    Hi Greg,

    You can set the navigation per folder by creating an index block that indexes the whole site. Then you can create a format that finds the top folder based on the current page and creates the links for all of the pages.

    If your site is really large, than an index block of this magnitude could cause you to have Cascade performance issues with load time of pages (within Cascade only, published pages will not be affected). So if your site is large or you notice pages slowing down, you may be interested in the locator tool. This is a fast way to index to the top folder and grab the children, but can be a bit complex to write.

    Thanks,

    Lisa

  5. 5 Posted by Greg Phipps on 13 Aug, 2015 05:44 PM

    Greg Phipps's Avatar

    Lisa,

    We only want to do it for those few pages I listed in the screenshot. About 10-15 pages. It's only for our dept. I know how to create an index block but how would I do the formatting? Can you be more specific about exactly what settings to use?

    Thanks for the fast response.

    Greg

  6. 6 Posted by Lisa McWilliams on 13 Aug, 2015 06:39 PM

    Lisa McWilliams 's Avatar

    Hi Greg,

    If it is only for a few pages, how do you feel about a static block?

    For the index block, you would create a folder based index block and then
    select the base folder for the root '/'.

    Then you would create a velocity (or XSLT) format to loop through the
    folders and items and output them in your html (ul or divs or however you
    have it set-up in your image example).

    How much experience do you have with formats? Do you have any Velocity or
    XSLT experience?

    Thanks,

    Lisa

    Lisa McWilliams

    Services Project Manager
    Hannon Hill

    Blog <http://www.hannonhill.com/news/blog/index.html> | Twitter
    <https://twitter.com/Hannon_Hill> | Facebook
    <https://www.facebook.com/HannonHillCorp>
    The 10th annual Cascade User Conference
    <http://www3.hannonhill.com/cuc15-conference-website-link> is Sept 20-22!
    #CUC15

  7. 7 Posted by Gregory Phipps on 13 Aug, 2015 06:46 PM

    Gregory Phipps's Avatar

    No Velocity or XSLT experience. :) I understood the creating an index block, that’s about it. Haha. Is there a tutorial online or something that explains how to do it?

    Right now we just have one folder with all our pages in it. So we can see everything at once in the sidebar nav. I had it where “Institutional Assessment” and “Strategic Planning” were folders with pages inside, but the department didn’t like that the sidebar nav changed when someone visited one of those two folders. They want all the pages visible, but the “Institutional Assessment” and “Strategic Planning” pages indented underneath.

    Greg

  8. 8 Posted by Lisa McWilliams on 13 Aug, 2015 07:04 PM

    Lisa McWilliams 's Avatar

    Hi Greg,

    Before diving into this kind of project, I would strongly recommend signing
    up for the free training. The training covers how to format block
    information on the page and also will have you create a basic folder level
    navigation.

    The class for September is full, but you can sign up for the October
    training here:

    http://www.hannonhill.com/services/training/free-training-cascade-server-bootcamp.html

    Is anyone from your team attending our user conference next month? Our
    staff will be on-hand to provide help with any issues you might be having
    or things you need to learn. You can register for the conference here:

    http://conference.hannonhill.com/

    (The registration button is in the top right corner)

    We also offer custom training and consulting packages if you need a little
    one-on-one assistance, or group trainings if your team needs to be trained
    (or if you just can't wait until October).

    In the meantime, I think creating a static XHTML block with the navigation
    items and applying that to those 10-15 pages is a good work around.

    Thanks,

    Lisa

    Lisa McWilliams

    Services Project Manager
    Hannon Hill

    Blog <http://www.hannonhill.com/news/blog/index.html> | Twitter
    <https://twitter.com/Hannon_Hill> | Facebook
    <https://www.facebook.com/HannonHillCorp>
    The 10th annual Cascade User Conference
    <http://www3.hannonhill.com/cuc15-conference-website-link> is Sept 20-22!
    #CUC15

  9. 9 Posted by Gregory Phipps on 13 Aug, 2015 07:21 PM

    Gregory Phipps's Avatar

    Thanks, Lisa. I have been through the training at our university and can handle formatting blocks and creating folders. I just don’t understand the programming terminology. I thought it might be a simple setting I was missing in the use of an index block, and easily explainable. For now, I’ll just try to figure it out as you described. Thanks for the help.

    Greg

  10. 10 Posted by Gregory Phipps on 13 Aug, 2015 07:23 PM

    Gregory Phipps's Avatar

    Oh.. oh… I see. Create an xhtml block with the links and use that. I get it now. Haha. :) Why didn’t I think of that!

    G

  11. Tim closed this discussion on 25 Aug, 2015 01:02 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac