You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ralph Goers <Ra...@dslextreme.com> on 2004/09/02 00:49:43 UTC
Portal navigation items
The Portal seems to generate named-items for each main tab as well as
named-items for tabs for the current page. It does not return any
navigation items for other pages. We have a need to access those so that
DHTML subnavigation menus can be used for all the tabs (i.e. you will see
the sub-nav items when the cursor is placed over the main nav item).
1. Is there a way to get the portal to do this without modifying code.
2. If not, what code do I need to modify?
Thanks,
Ralph
RE: Portal navigation items
Posted by Ralph Goers <Ra...@dslextreme.com>.
I modified TabContentAspect as was discussed yesterday. I was able to
generate the sub-navigation and the urls however, when I try to select them
they don't work. Just for testing I modified the code to call
processLayout for every tab - not just the one selected. As you would
expect, this generated a single page containing the whole website. I then
tried selecting one of the sub-nav items from a different page and again it
didn't work.
While testing I noticed that when I entered the url for the sub nav it was
marked with selected=true. However, the parent tab was not selected! The
selected tab was still the initial page (or whatever page I was on when I
selected the sub-nav). The implication is that when directly selecting a
sub-nav item all of its ancestors must also be marked as selected (at least
that's what I think). Unfortunately, I haven't figured out how all the
event handling stuff works yet, except that I'm guessing that
RequestParameterEventAspect is somewhere in the picture.
I'd appreciate your advice on where to look next.
Thanks,
Ralph
RE: Portal navigation items
Posted by Carsten Ziegeler <cz...@apache.org>.
Ralph Goers wrote:
> Thanks for the feedback. I wasn't thinking of calling
> processLayout - I'd leave that only for the selected tab.
>
> I was thinking of something like:
>
> // existing code
> if (j ==selected) {
> processLayout(....)
> }
> // new code
> else if (config.generateSubNav) {
> this.processSubNav(tab.getLayout, ...); }
>
> processSubNav would generate a "sub-nav" element and then
> generate named-item elements for each tab. It would then call
> toSax() to recursive process any subordinate sub-nav below that.
>
> Am I missing something in thinking that this would keep the
> coplets from being rendered? If I am, then yes, it should be
> an easy matter to strip the stuff from non-selected tabs,
> although that isn't very "pretty".
Yes, this should work.
Carsten
RE: Portal navigation items
Posted by Ralph Goers <Ra...@dslextreme.com>.
At 9/2/2004 12:01 AM, you wrote:
>Ralph Goers wrote:
> >
> > I looked at this some more. It looks like I need to generate
> > the sub-navigation for non-selected items in
> > TabContentAspect.java. Would it be OK to add another boolean
> > parameter to control whether to generate this?
> >
>You could do this and it would solve your problem, but :) currently
>onle the coplets that are visible are triggered - which means they
>are asked to deliver they content. If you do your changes then
>*all* coplets of the current user are triggered - even if they
>are not visible. In addition, you have to modify the stylesheets
>to not render all of this additional information.
>
>Hmm, thinking about it, you could change the aspect the way you
>suggest and you could then change the stylesheets that they
>remove everything from not selected tabs (coplets etc) but
>contained tabs. This should work.
>
>HTH
>Carsten
Thanks for the feedback. I wasn't thinking of calling processLayout - I'd
leave that only for the selected tab.
I was thinking of something like:
// existing code
if (j ==selected) {
processLayout(....)
}
// new code
else if (config.generateSubNav) {
this.processSubNav(tab.getLayout, ...);
}
processSubNav would generate a "sub-nav" element and then generate
named-item elements for each tab. It would then call toSax() to recursive
process any subordinate sub-nav below that.
Am I missing something in thinking that this would keep the coplets from
being rendered? If I am, then yes, it should be an easy matter to strip
the stuff from non-selected tabs, although that isn't very "pretty".
Ralph
RE: Portal navigation items
Posted by Carsten Ziegeler <cz...@apache.org>.
Ralph Goers wrote:
>
> I looked at this some more. It looks like I need to generate
> the sub-navigation for non-selected items in
> TabContentAspect.java. Would it be OK to add another boolean
> parameter to control whether to generate this?
>
You could do this and it would solve your problem, but :) currently
onle the coplets that are visible are triggered - which means they
are asked to deliver they content. If you do your changes then
*all* coplets of the current user are triggered - even if they
are not visible. In addition, you have to modify the stylesheets
to not render all of this additional information.
Hmm, thinking about it, you could change the aspect the way you
suggest and you could then change the stylesheets that they
remove everything from not selected tabs (coplets etc) but
contained tabs. This should work.
HTH
Carsten
>
>
> Ralph Goers said:
> >
> > The Portal seems to generate named-items for each main tab
> as well as
> > named-items for tabs for the current page. It does not return any
> > navigation items for other pages. We have a need to access
> those so
> > that DHTML subnavigation menus can be used for all the tabs
> (i.e. you
> > will see the sub-nav items when the cursor is placed over
> the main nav item).
> >
> > 1. Is there a way to get the portal to do this without
> modifying code.
> > 2. If not, what code do I need to modify?
> >
> > Thanks,
> >
> > Ralph
> >
> >
> >
>
>
Re: Portal navigation items
Posted by Ralph Goers <Ra...@dslextreme.com>.
I looked at this some more. It looks like I need to generate the
sub-navigation for non-selected items in TabContentAspect.java. Would it
be OK to add another boolean parameter to control whether to generate
this?
Ralph
Ralph Goers said:
>
> The Portal seems to generate named-items for each main tab as well as
> named-items for tabs for the current page. It does not return any
> navigation items for other pages. We have a need to access those so that
> DHTML subnavigation menus can be used for all the tabs (i.e. you will see
> the sub-nav items when the cursor is placed over the main nav item).
>
> 1. Is there a way to get the portal to do this without modifying code.
> 2. If not, what code do I need to modify?
>
> Thanks,
>
> Ralph
>
>
>