Cody Burleson commented on Mar 2, 2012

Re: Generating a nested list in a navigator component

You spoke, IBM listened. Nested Navigator Designs are on the way in the next release:

Sebastian Fratini commented on Sep 7, 2011

Re: Generating a nested list in a navigator component

Well, the format is gone. Check the code here:

http://snipt.org/xnxh

Sebastian Fratini commented on Sep 7, 2011

Re: Generating a nested list in a navigator component

I'v created the following navigator to create a nested navigation without the need of a JSP. (Note: I am retrieving a link component for each sitearea, but you get the point):

Header:

    Footer:

Result One:

" target="" title="">

Mark C Hampton commented on Oct 21, 2010

Generating a nested list in a navigator component

Indentation is fine for sighted users, but is not an accessible solution for navigation.

And yes, it would be nice to syndicate JSPs :)

Pete Kempf commented on Oct 13, 2010

Generating a nested list in a navigator component

We are using the standard Navigator component to generate "nested" navigation, but not using ul/li. Instead we are using the IndentCmpnt tag in the "Navigator result design 1" and specifying the repeat ttribute with nbsp and offset of 0. This indents each level appropriately. We use AlternateDesign to handle site areas differently than content, selected vs. non-selected. Of course we rely on styles to format nicely.

I agree the nested navigation component should have been provided out of the box. Relying on JSPs is a problem since it involves a code deployment, not just a syndication. Wouldn't it be nice if we could syndicate the WCM JSPs?

Mark C Hampton commented on Aug 30, 2010

Generating a nested list in a navigator component

Hi Pete

Nested markup generation will be provided in a future product release; quite soon I believe. As with all features, it had to be prioritized against everything else that has been requested.

On the backing up of custom code on fix installs... this is only required if you deploy your custom code in the WCM application. I would not recommend doing this.

All custom code should instead be deployed into other applications. JSP components and element JSPs both support referencing of JSPs in remote web applications.

If you have a custom theme, putting your rendering JSPs in there makes sense, and you then have a single deployable "rendering application". Workflow actions, authoring JSPs, etc. should go into another app.

Pete R Raleigh commented on Aug 29, 2010

Generating a nested list in a navigator component

QUOTE: "... A very common request we get asked about in the lab is how to generate nested list navigation using WCM..."

If this is such a "very common request", why not roll this sort of functionality into the produce (out-of-the-box)? Why force customers to write JSP code, only to force them to back it up whenever a Fix / Fix Pack is deployed?

Please roll these sorts of requests into the product. Examples like these are fantastic, but how do you think it is received by senior Business members when you tell them you have to write custom JSP code because it isn't out-of-the-box functionality (and which may or may not be supported by IBM)?

Just my 2cents worth.

Mark C Hampton commented on Aug 23, 2010

Generating a nested list in a navigator component

Hi Scott

Thanks for picking this up. Looks like a problem with the code display in this wiki as the code does have escapes in it. I'll have to see if I can get that fixed.

On the style for the first level selection, you could do that without adding any new classes. What you could do is select the first level class explicitly and style it, and then select subsequent levels for a different styling.

Like this:

.myNav .list > .selected > a { ... top level selected style ... }

.myNav .list > .selected .selected > a { ... other levels selected style ... }

Scott Leis commented on Aug 17, 2010

Generating a nested list in a navigator component

Hmm** these comments are trying to render HTML tags when I don't want them to.

Re escaping quotes I'm talking about lines where you have a class attribute; I think the quotes around the attribute value need to be backslash-escaped for the code to compile.

Scott Leis commented on Aug 17, 2010

Generating a nested list in a navigator component

Don't you need to escape quotes in strings in your RenderNestedListResult.jsp file?

E.g. a line like:

out.println("

    ");

    Should really be:

    out.println("

      ");

      I'm part-way through implementing this with a second copy of the RenderNestedListResult component with an extra request parameter so I can use an AlternateDesign tag and apply an extra style to highlight the top-level menu for the current site area.

Mark C Hampton commented on Aug 12, 2010

Generating a nested list in a navigator component

Thanks for the comments Soren :)

isFirst:

You could check for baseLevel as an indication of the first time in. Personally I think it's clearer to have a separate attribute, but yes it's not really adding anything.

First class:

I did think about putting a class on the first item in each level, but as yet I haven't found a need for that so I decided not to. So far I have found that for all the styles I've implemented, I only need an override for the very first item.

If you did need to override the style on the first item at each level it would be a simple change to the code. Choice then is whether you would want an additional class for first vs. first for level, OR just use the {{{>}}} notation in the class selector to target just the very first item if that's the only one that needs an override.

Scope param: This is passed in via query string in the JSP component - RenderNestedListResult.jsp?scope=myNav. The was just namespacing really to avoid interfering with someone else's code. The code was written for portlet or servlet, so no guarantee of portlet ID. In a specific scenario, you could drop this altogether, or use portlet ID, up to you.

Soren Mogensen commented on Aug 11, 2010

Generating a nested list in a navigator component

That should have been: ... whenever a new "<ul>" is inserted...

Soren Mogensen commented on Aug 11, 2010

Generating a nested list in a navigator component

There is as far as I can tell no reason for storing the isFirst attribute in the request. You could merely check whether the base attribute was null, and only set it if that was the case.

Depending on CSS requirements it could be advantageous to set the isFirst boolean to true whenever a new "

    " is inserted.

    Regarding the scope parameter - how are you passing this in? and would it not be feasible to use the portlet id (assuming only a single navigator using this functionality in each portlet)?