You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Thorsten Scherler <th...@juntadeandalucia.es> on 2006/12/04 09:39:21 UTC

Re: Dispatcher: projectspecific tab-to-menu.xsl

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


Re: Dispatcher: projectspecific tab-to-menu.xsl

Posted by Thorsten Scherler <th...@apache.org>.
On Wed, 2006-12-13 at 07:56 +0100, C. Grobmeier wrote:
> Hi,
> 
> just wanted to give some positive feedback to this list, thank you guys 
> for beeing so patient with me.

No worries, have been no problem. Thanks for the feedback.

>  And here is my result:
> 
> http://root.neotecc.de/DRAFTS/grobmeier.de/
> 
> I know that the colors are sometimes a bit strange and my CSS is not the 
> best one ever written but i think the direction becomes clear :-) This 
> theme is not perfect yet, but i will try to make it better.
> 

<meta content="common" name="Forrest-theme-name" /> 

based on common, nice.

> At the moment i am writing a document which gets you started with 
> forrest. It's in german and this will may take till march. After this 
> and maybe next i hope that i can rewrite your suggestions to some kind 
> of user-docs and contribute it.

Actually if you could contribute the german doc that is very fine as
well. Maybe someone can later on translate it in English.

If you encounter sharp corners just write us and we will try to help.

salu2

> 
> Cheers,
> Chris
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)



Re: Dispatcher: projectspecific tab-to-menu.xsl

Posted by "C. Grobmeier" <gr...@possessed.de>.
Hi,

just wanted to give some positive feedback to this list, thank you guys 
for beeing so patient with me. And here is my result:

http://root.neotecc.de/DRAFTS/grobmeier.de/

I know that the colors are sometimes a bit strange and my CSS is not the 
best one ever written but i think the direction becomes clear :-) This 
theme is not perfect yet, but i will try to make it better.

At the moment i am writing a document which gets you started with 
forrest. It's in german and this will may take till march. After this 
and maybe next i hope that i can rewrite your suggestions to some kind 
of user-docs and contribute it.

Cheers,
Chris

Re: Dispatcher: projectspecific tab-to-menu.xsl

Posted by "C. Grobmeier" <gr...@possessed.de>.
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
>