forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: url based structurer from plugins
Date Fri, 19 Jan 2007 09:27:14 GMT
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. i.e.
>>
>> <match pattern="{properties:solr-search-adv}">
>>
>> We can use {properties:*} in the pattern, right?
>>
> 
> I tried but it does not seems to work.

Oh well, it would have been nice. Perhaps something for the future. I'm 
not intending to make this a condition of your proposal for "url based 
structurer".

> 
> Further I do not really understand this solution.
> 
> <property name="solr-search-adv" value="solr-search.html"/>
> or 
> <property name="solr-search-adv"
> value="resolvePluginStructurer.solr-search-adv"/>
> 
> I guess it should have been the last one, or?

The way I wrote the match yes. Of course, if we could use input modules 
in the pattern it could have been:

<match pattern="resolvePluginStructurer.{properties:solr-search-adv}">

and

<property name="solr-search-adv" value="solr-search.html"/>

Thus, if "solr-search.html" were used as a document URL in a given site 
the user would just need to add something like the following to 
properties.xml:

<property name="solr-search-adv" value="solrSearch.html"/>

In your specific case the name is fairly specific so would probably not 
be a problem, but remember that for a long time Forrest has "reserved" 
paths such as "faq.*". Your post made me think of a possible way around 
this reservation.

One for the memory banks and a rainy day I think.

Ross

Mime
View raw message