forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject Re: url based structurer from plugins
Date Thu, 18 Jan 2007 11:28:44 GMT
On Thu, 2007-01-18 at 10:49 +0000, Ross Gardler wrote:
> Thorsten Scherler wrote:
> > On Thu, 2007-01-18 at 09:19 +0000, Ross Gardler wrote:
> >> Thorsten Scherler wrote:
> >>> The ultimate changes in the dispatcher have been mainly allowing plugins
> >>> to provide dispatcher based resources by ad.
> >>>
> >>> We now support:
> >>> - contracts
> >>> - x (tiles)
> >>> - resources
> >>>
> >>> I think we should allow url related structurer as well. 
> >>>
> >>> Meaning e.g. the solr plugin could provide via
> >>> resources/structurer/url/solr-search-adv.fv 
> >>> an advanced search form. 
> >>>
> >>> One could then use it in the project like
> >>> http://localhost:8888/solr-search-adv.html and it would match the
> >>> default implementation if no project one can be found.
> >>>
> >>> wdyt?
> >> There is precedent for this in various plugins (including projectInfo).
> >>
> >> If possible, I'd recommend making the URL configurable from the 
> >> locationmap just in case there is ever a clash with a users urlspace.
> > 
> > Yeah, about the url space:
> > What I recommend is:
> > Index: org.apache.forrest.plugin.internal.dispatcher/locationmap.xml
> > ===================================================================
> > --- org.apache.forrest.plugin.internal.dispatcher/locationmap.xml
> > (revision 497342)
> > +++ org.apache.forrest.plugin.internal.dispatcher/locationmap.xml
> > (working copy)
> > @@ -228,6 +228,8 @@
> >              project-based theme-based = directory-based /
> > parent-directory based (recursively) -->
> >                      <location src="{uri}" />
> >                  </act>
> > +                <!--  plugin provided Structurer -->
> > +                <location src="{lm:resolvePluginStructurer.{1}}" />
> >                  <!-- themes-dir: project-application-based
> > theme-dir-based -->
> >                  <location
> > src="{lm:themer.project.dir}/{properties:dispatcher.theme}{properties:dispatcher.theme-ext}"
> 
> That's the ability to override the source url space, I was thinking of 
> the client urlspace. the above doesn't help if a site already has 
> "solr-search-adv.html" or a match for something like "solr*.html" in 
> their project sitemap.

Well, if you have such a match in your project sitemap, it would have
preference over the one from the dispatcher. If your project still would
like to use the search form from the plugin you need to implement a url
structurer (and place it in the desired route) like (not tested but
should work if we allow subject line):

<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
 <jx:import uri="lm://resolvePluginStructurer.solr-search-adv"/>
</jx:template>

Makes sense?

salu2


Mime
View raw message