[HippoCMS-dev] Ideas for making CMS components extendable

Ard Schrijvers a.schrijvers at hippo.nl
Mon Oct 2 11:11:42 CEST 2006


> Bart van der Schans wrote:
> > Niels van Kampenhout wrote:
> >> Niels van Kampenhout wrote:
> >>> We probably need to do something like this for overriding sitemaps
> >>> that are not directly mapped to a perspective, such as the actions
> >>> component.
> >> I now think I have a better/cleaner solution, that also covers the
> >> abovementioned sitemaps.
> >>
> >> In our main sitemap, we could replace this matcher:
> >>
> >>       <!-- mount subsitemaps -->
> >>       <map:match pattern="*/**">
> >>         <map:mount uri-prefix="{1}" src="{1}/" />
> >>       </map:match>
> >>
> >> with this matcher:
> >>
> >>       <!-- mount subsitemaps -->
> >>       <map:match pattern="*/**">
> >>         <map:select type="resource-exists">
> >>           <map:when test="extensions://{1}/sitemap.xmap">
> >>             <map:mount uri-prefix="{1}" src="extensions://{1}/" />
> >>           </map:when>
> >>           <map:otherwise>
> >>             <map:mount uri-prefix="{1}" src="{1}/" />
> >>           </map:otherwise>
> >>         </map:select>
> >>       </map:match>
> >>
> >> Now if you want to override one specific pipeline in the explorer
> >> sitemap in your extensions, you make a folder "explorer" under
> >> extensions containing at least a sitemap, and at the bottom add the
> >> following matcher:
> >>
> >>       <map:match pattern="**">
> >>         <map:mount src="site://explorer/" uri-prefix=""/>
> >>       </map:match>
> >>
> >> Every single pipeline in the standard explorer sitemap can now be
> >> overridden in the extensions/explorer sitemap by placing a 
> matcher above
> >> the "**" matcher. No need to make custom perspective 
> configuration, or
> >> to use a location map.
> >>
> >> WDYT?
> > What would be the performance impact of this setup? If I 
> understand this
> > correctly every request will invoke a lookup on the 
> filesystem, right?

This will never imply slowdown in performance: every request that is cached checks filesystem files for timestamps of its depending files. This is really fast and never slows your performance down

> 
> I am not sure what the performance impact of the resource-exists 
> selector is. With my local setup I don't notice the 
> difference. I think 
> for each request in the CMS there are so many file lookups 
> that one more 
> doesn't make a big difference, but this is just a feeling.
> 
> If it is too slow, maybe we can work around using the resource-exists 
> selector some how?
> 
> Niels
> 
> ********************************************
> Hippocms-dev: Hippo CMS development public mailinglist
> 


More information about the Hippocms-dev mailing list