forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyriaque Dupoirieux <Cyriaque.Dupoiri...@pcotech.fr>
Subject Re: Dispatcher: projectspecific tab-to-menu.xsl
Date Mon, 04 Dec 2006 11:20:04 GMT
le 03/12/2006 01:22 C. Grobmeier a écrit :
> Hi,
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"/>
The cocoon://#{$getRequest}.navigation.xml will give you the navigation 
links of the current page as follows :
<navigation>
    <tab>
    <ul id="nav-main">
    <li>
        <a class="base-not-selected" href="../accueil.html">A propos</a>
    </li>
    <li class="current">
        <a class="base-selected" href="../linux/linux.html">Linux</a>
    </li>
    <!-- Next tabs links -->
</ul>
</tab>
    <menu>
        <div id="menu">
            <ul>
                <li>
                    <h1>Linux</h1>
                    <ul>
                        <li>
                            <a href="../linux/linux.html" title="Tout ce 
que je sais sur la Linux Mandriva 2006">Linux Mandriva 2006</a>
                        </li>
                        <!-- Next toc links -->
                    </ul>
                </li>
            </ul>
        </div>
    </menu>
</navigation>

You can check it with forrest run and use the the Navigation option in 
the Dispatcher-Dev menu of the forrest bar.
(or try a URL like the following - still with forrest run : 
http://localhost:8888/index.navigation.xml)

In the .ft file you can read :
<xsl:copy-of
     select="navigation/tab/ul[@id='nav-main']"/>
That's it, I think that this copy-of will directly copy the <ul> tag 
found in /navigation/tab :
<ul id="nav-main">
    <li>
        <a class="base-not-selected" href="../accueil.html">A propos</a>
    </li>
    <li class="current">
        <a class="base-selected" href="../linux/linux.html">Linux</a>
    </li>
    <!-- Next tabs links -->
</ul>
In my example...

If you want to change this, two solutions :
Try with a good css file :
ul {
decoration=none ;
}
Or create a copy of the .ft file in your 
$PROJECT_HOME/src/documentation/resources/themes/pelt/html/ - where 
*pelt* is your theme name.
(and update it to get the result you want...)

Salutations,
Cyriaque,



>
> At the first look, i couldn't see where my <ul> Tags came out, so i 
> was confused. 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.
>
> 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? I couldn't imagine how to do that, so you advise is very 
> appreciated :-)
>
> Cheers,
> Chris
>
>

Mime
View raw message