forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: Menu Overhead Problem (and an offer to fix it)
Date Mon, 21 Nov 2005 11:26:53 GMT
El dom, 20-11-2005 a las 07:43 -0500, Tim Williams escribió:

...
> 
> Unfortunately, I don't have the time right now to provide details, but
> what you describe is exactly the problem I was having with the
> metadata driven plugin (blogs) that I was trying to do.  The problem
> was maintaining menu context when navigation is done in the content of
> the page similar to what you describe.  In that plugin, I'm trying to
> get "Categories" to be displayed in the menu, then, when the user
> clicks on the category an index of articles (generated by
> xpathdirectorygenerator) comes up in the content of the page.  All is
> well until a user clicks on the individual article, then the menu
> collapses and the navigation context is lost.  In my case, it's a bit
> more difficult I think because an Article may belong to more than one
> category and so the context in which the traversed to the article
> needs to be known.  Anway, this is to say that I think we have very
> similar use-cases here and I would hope that we can come up with a
> common solution -- I was just going to wait on views to try to solve
> it.
> 

Hmm, you can do it with v2 if I understood you right.

What you need to do is create a common.fv in the location of your
individual articles. e.g. .../blogs/articles/someArticle.
Then you request a fixed menu location instead of the path aware
location. like:

<forrest:contract name="nav-section">
            <forrest:properties contract="nav-section">
              <forrest:property name="nav-section"
nugget="get.navigation">
                <jx:import
uri="cocoon://blogs/articles.navigation.xml"/>
              </forrest:property>
              <forrest:property name="nav-section-toc" nugget="get.tov">
                <jx:import
uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/>
              </forrest:property>
              <forrest:property name="toc" max-depth="2"/>
            </forrest:properties>
          </forrest:contract>

You need to specify cocoon://blogs/articles.navigation.xml in your
plugin to generate your specific menu. There you can add all the dynamic
locations and bypass the site.xml menu generation.

> I'll try to get back to this later this evening.
> --tim

Does that makes sense?


salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Mime
View raw message