CFAS Webmaster wrote: > David Crossley wrote: > > > >You can see that default match at main/webapp/resources.xmap > >line 153 ... > ><!-- @deprecated --> > ><map:match pattern="**.js"> > ><map:read src="resources/scripts/{1}.js" > >mime-type="application/x-javascript" /> > ></map:match> > > > >I wonder if we should change that so that it first > >looked in sub-directories and then looked at the > >top-level of resources/scripts/ > > > That would be nice for me, but is it the "right" thing to do for the > general case? > > >That says "deprecated". I wonder why. Supposedly > >because now the main technique is that skin-specific > >method described in the FAQ. However this is still > >needed for legacy html. > > > >BTW, how will this be handled with Dispatcher? > >Would it still use the technique described in the FAQ? > > > >Otherwise Paul, as always you can over-ride any > >match as Ross describes below. > > > I'd take you up on that, but it doesn't work. I think I've found the > "right place" for it, but it doesn't change the behavior. > > ... > <map:pipelines> > <map:pipeline> > ... > <map:match pattern="dues.js"> > <map:read src="{project:content}/Committees/dues.js" > mime-type="text/plain"/> > </map:match> > </map:pipeline> > </map:pipelines> > > If map:match pattern... is placed almost anywhere else in the file it > doesn't validate. No matter where it's placed, it doesn't change the > behavior of Cocoon. :(
How about this: ... <map:pipelines> <map:pipeline> ... <!-- ensure that the match deals with sub-directories --> <map:match pattern="**dues.js"> <!-- or be very specific <map:match pattern="**Committees/dues.js"> --> <map:read src="{project:content}/Committees/dues.js" mime-type="application/x-javascript" /> <!-- use the correct mime-type as shown above in main/webapp/resources.xmap --> </map:match> </map:pipeline> </map:pipelines> Or you could get very general like this. However, this might interefere too much with the core of Forrest. <map:match pattern="**/*.js"> <map:read src="{project:content}/{1}/{2}.js" mime-type="application/x-javascript" /> </map:match> I presume that you have the dues.js at src/documentation/content/Committees/dues.js -David