forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C. Grobmeier" <grobme...@possessed.de>
Subject Re: Dispatcher: projectspecific tab-to-menu.xsl
Date Tue, 05 Dec 2006 06:59:34 GMT
Thanks Thorsten and Cyriaque,
i will try this at weekend :-)
Regards,
Chris

Thorsten Scherler wrote:
> On Sun, 2006-12-03 at 01:22 +0100, C. Grobmeier wrote:
>> Hi,
>>
>> at the moment i get the following output for tabs:
>>
>> <!--+ |start Tabs new +-->
>> <ul id="nav-main">
>> <li class="current">
>> <a class="base-selected" href="index.html">Home</a>
>> </li>
>> ...
>>
>> I wanted to change this in something without list. So i took a look into 
>> the corresponding .ft file:
>>
>> <xsl:copy-of
>>       select="navigation/tab/ul[@id='nav-main']"/>
>>
>> and common.fv:
>>   <forrest:contract name="nav-main"
>>        dataURI="cocoon://#{$getRequest}.navigation.xml"/>
>>
>> At the first look, i couldn't see where my <ul> Tags came out, so i was 
>> confused.
> 
> It is coming from a data factory (dataModel.xmap). If you want to hange
> the list to divs, then the easiest is to implement your own navigation
> contract.
> 
>>  I searched a bit and found 2 files called tab-to-menu.xsl in 
>> the dispatcher folders. One of them overrides the base functionality. So 
>> far so good. I try to copy and paste this file into 
>> $PROJECT/.../resources/stylesheets and into the 
>> $PROJECT/.../resources/themes/commons/xslt folder but this had no effect.
> 
> Yeah, because this location is not enabled. If you really need to
> implement your own implementation for the tabs (I think you do not need
> this) then you can implement in your project locationmap  <map:transform
> src="{lm:dataModel-html-tab-to-menu.xsl}"> and you do not need to change
> anything in forrest.
> 
> ...but that is IMO not needed because you are not trying to get another
> navigation into forrest (like one that is not only based on tab/site but
> maybe another component). 
> 
> 
>> It only had affect when changed the file in the $FORREST/dispatcher 
>> folders... this is not very cool, so i wanted to ask how can override 
>> this file in my project-folder? Or am i going better with having a new 
>> contract? 
> 
> Yes, since what you are trying to archive, using divs instead a list,
> you can just copy the corresponding contract into your project and
> change <xsl:copy-of select="navigation/tab/ul[@id='nav-main']"/>
> to <xsl:apply-templates select="navigation/tab/ul[@id='nav-main']"/>
> and implement the needed transformation.
> 
>> I couldn't imagine how to do that, so you advise is very 
>> appreciated :-)
>>
> http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.internal.dispatcher/how/howto-dispatcher-quickstart.html#add-project-contract
> 
> HTH
> 
> salu2
> 
> 
>> Cheers,
>> Chris
> 


Mime
View raw message