You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Cyriaque Dupoirieux <Cy...@pcotech.fr> on 2005/10/24 18:00:51 UTC

[Structurer] Toc in navbar with pelt theme

Hi,

    The nav-section template now takes :

    <jx:import
    uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>

in parameter. I am not sure it is enough to create the mini-toc in the 
left bar ?
    Do I add <jx:import 
uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/> to get 
information I need or are they in the navigation.xml ?

Salutations,
Cyriaque,


Re: [Structurer] Toc in navbar with pelt theme

Posted by Thorsten Scherler <th...@apache.org>.
El mar, 25-10-2005 a las 14:30 +0200, Cyriaque Dupoirieux escribió:
> * At last, but not least, the links (href) indicated in the
>           o
> 
> cocoon://#{$cocoon/parameters/getRequest}.toc.xml
> 
>           o
> 
> are not good, they do not exist in the generated content page...


I fixed that.

Thx for pointing this out.

salu2
-- 
thorsten

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


Re: [Structurer] Toc in navbar with pelt theme

Posted by Thorsten Scherler <th...@apache.org>.
El mié, 26-10-2005 a las 00:18 +0200, Thorsten Scherler escribió:
> El mar, 25-10-2005 a las 14:30 +0200, Cyriaque Dupoirieux escribió:
...
> > 
> >     * The scripts included in themes (*.ft) comes from
> >       $FORREST_HOME/main/webapp/skins/common/scripts - ie in a *.ft :
> >           o <xsl:template name="nav-section-head">
> >                       <script type="text/javascript"
> >             language="javascript" src="{$root}skin/menu.js">&#160;</script>
> >             </xsl:template>
> >           o The problem may be that several themes use {$root}skin/ to
> >             include scripts.
> 
> Yes, your are right. We need to change it and is the next point on my to
> do-list. 
> 
> Images and javascript *has to* go into the new themes dir to the
> responding theme. The common stuff should go to the default (common)
> theme. 

Jscripts are now in themes/{theme}/js/*.js

salu2
-- 
thorsten

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


Re: [Structurer] Toc in navbar with pelt theme

Posted by Thorsten Scherler <th...@apache.org>.
El mar, 25-10-2005 a las 14:30 +0200, Cyriaque Dupoirieux escribió:
> Thorsten Scherler a écrit :
> 
> >El lun, 24-10-2005 a las 18:00 +0200, Cyriaque Dupoirieux escribió:
> >  
> >
> >>Hi,
> >>
> >>    The nav-section template now takes :
> >>
> >>    <jx:import
> >>    uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
> >>
> >>in parameter. I am not sure it is enough to create the mini-toc in the 
> >>left bar ?
> >>    
> >>
> >
> >No, you can see this in requesting localhost:8888/index.navigation.xml.
> >  
> >
> Thank you, it is a very good information. This may be included in our 
> documentation !
> 

yeah, I reckon you are right. BTW that is working for nearly all pipes
we have in forrest (and all pipes of views) due to the fact that we
nearly do not use internal-only pipes.

> >  
> >
> >>    Do I add <jx:import 
> >>uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/> to get 
> >>information I need or are they in the navigation.xml ?
> >>    
> >>
> >
> >Yes, you need to extend (in fv)
> ><forrest:contract name="nav-section">
> >  <forrest:properties contract="nav-section">
> >    <forrest:property name="nav-section" nugget="get.navigation">
> >      <jx:import
> >uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
> >    </forrest:property>
> >    <forrest:property name="nav-section-toc" nugget="get.tov">

oops typo: nugget="get.tov"
should be nugget="get.toc"

I saw that in your recent commit as well. ;-) 

> >      <jx:import
> >uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/>
> >    </forrest:property>
> >  </forrest:properties>
> ></forrest:contract>
> >
> >in the contract:
> ><xsl:template name="nav-section-body">
> >  <xsl:param name="nav-section" select="'test'"/>
> >  <xsl:param name="nav-section-toc" select="'test'"/>
> >...
> ><xsl:call-template name="menu">
> >  <xsl:with-param name="root" select="$nav-section/navigation/menu"/>
> >  <xsl:with-param name="toc" select="$nav-section-toc"/>
> ></xsl:call-template>
> >...
> >You need to pass this param through the templates (important!!!) till
> >you find:
> ><xsl:for-each select = "//tocitems/tocitem"/>
> >That should then read:
> ><xsl:for-each select = "$toc//tocitems/tocitem"/>
> >
> >  
> >
> Thank you again, everything is done.

I saw, very nice. Thx Cyriaque for your patient with v2 (and all the
movement in it) and still doing enhancement. :)

> I still have the following problems :
> 
>     * Images indicated in the css are not found - ie in a css :
>           o background-images: url('images/chapter.gif');
> 

Yes, because it is not skin/images/chapter.gif.

We really need to change the image linking to "themes/images" see below
for more.

> 
>     * The scripts included in themes (*.ft) comes from
>       $FORREST_HOME/main/webapp/skins/common/scripts - ie in a *.ft :
>           o <xsl:template name="nav-section-head">
>                       <script type="text/javascript"
>             language="javascript" src="{$root}skin/menu.js">&#160;</script>
>             </xsl:template>
>           o The problem may be that several themes use {$root}skin/ to
>             include scripts.

Yes, your are right. We need to change it and is the next point on my to
do-list. 

Images and javascript *has to* go into the new themes dir to the
responding theme. The common stuff should go to the default (common)
theme. 

The resource.xmap in forrest main and in views have to be refactored for
lm. I hesitated to do it because I see some problems for the
implementation. I started with the css which was the easiest one. ;-) 

Javascript are quite easy as well but the images are a wee bit more
complicated (some of the pipes still need the skinconf.xml - e.g.
svg2png, round-corner,...). IMO that should all be done by contracts,
but still unsure about the implementation.

> 
>     * At last, but not least, the links (href) indicated in the
>           o
> 
> cocoon://#{$cocoon/parameters/getRequest}.toc.xml
> 
>           o
> 
> are not good, they do not exist in the generated content page...

I could not do an update yet (fishing in the dark right now), but I had
the same problem in http://localhost:8888/ls.contracts.html

I solved it by adding an unique id to the section generating in
ls.contracts-to-document.xsl. Trying to say the actual problem can be in
document2html.xsl. 

The docuemnt2toc.xsl produces nice #href so we should prefer them for id
generation over the document2html.xsl.

salu2
-- 
thorsten

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


Re: [Structurer] Toc in navbar with pelt theme

Posted by Cyriaque Dupoirieux <Cy...@pcotech.fr>.
Thorsten Scherler a écrit :

>El lun, 24-10-2005 a las 18:00 +0200, Cyriaque Dupoirieux escribió:
>  
>
>>Hi,
>>
>>    The nav-section template now takes :
>>
>>    <jx:import
>>    uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
>>
>>in parameter. I am not sure it is enough to create the mini-toc in the 
>>left bar ?
>>    
>>
>
>No, you can see this in requesting localhost:8888/index.navigation.xml.
>  
>
Thank you, it is a very good information. This may be included in our 
documentation !

>  
>
>>    Do I add <jx:import 
>>uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/> to get 
>>information I need or are they in the navigation.xml ?
>>    
>>
>
>Yes, you need to extend (in fv)
><forrest:contract name="nav-section">
>  <forrest:properties contract="nav-section">
>    <forrest:property name="nav-section" nugget="get.navigation">
>      <jx:import
>uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
>    </forrest:property>
>    <forrest:property name="nav-section-toc" nugget="get.tov">
>      <jx:import
>uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/>
>    </forrest:property>
>  </forrest:properties>
></forrest:contract>
>
>in the contract:
><xsl:template name="nav-section-body">
>  <xsl:param name="nav-section" select="'test'"/>
>  <xsl:param name="nav-section-toc" select="'test'"/>
>...
><xsl:call-template name="menu">
>  <xsl:with-param name="root" select="$nav-section/navigation/menu"/>
>  <xsl:with-param name="toc" select="$nav-section-toc"/>
></xsl:call-template>
>...
>You need to pass this param through the templates (important!!!) till
>you find:
><xsl:for-each select = "//tocitems/tocitem"/>
>That should then read:
><xsl:for-each select = "$toc//tocitems/tocitem"/>
>
>  
>
Thank you again, everything is done.
I still have the following problems :

    * Images indicated in the css are not found - ie in a css :
          o background-images: url('images/chapter.gif');


    * The scripts included in themes (*.ft) comes from
      $FORREST_HOME/main/webapp/skins/common/scripts - ie in a *.ft :
          o <xsl:template name="nav-section-head">
                      <script type="text/javascript"
            language="javascript" src="{$root}skin/menu.js">&#160;</script>
            </xsl:template>
          o The problem may be that several themes use {$root}skin/ to
            include scripts.


    * At last, but not least, the links (href) indicated in the
          o

cocoon://#{$cocoon/parameters/getRequest}.toc.xml

          o

are not good, they do not exist in the generated content page...

Salutations,
Cyriaque,

>HTH
>
>salu2
>  
>

Re: [Structurer] Toc in navbar with pelt theme

Posted by Thorsten Scherler <th...@apache.org>.
El lun, 24-10-2005 a las 18:00 +0200, Cyriaque Dupoirieux escribió:
> Hi,
> 
>     The nav-section template now takes :
> 
>     <jx:import
>     uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
> 
> in parameter. I am not sure it is enough to create the mini-toc in the 
> left bar ?

No, you can see this in requesting localhost:8888/index.navigation.xml.

>     Do I add <jx:import 
> uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/> to get 
> information I need or are they in the navigation.xml ?

Yes, you need to extend (in fv)
<forrest:contract name="nav-section">
  <forrest:properties contract="nav-section">
    <forrest:property name="nav-section" nugget="get.navigation">
      <jx:import
uri="cocoon://#{$cocoon/parameters/getRequest}.navigation.xml"/>
    </forrest:property>
    <forrest:property name="nav-section-toc" nugget="get.tov">
      <jx:import
uri="cocoon://#{$cocoon/parameters/getRequest}.toc.xml"/>
    </forrest:property>
  </forrest:properties>
</forrest:contract>

in the contract:
<xsl:template name="nav-section-body">
  <xsl:param name="nav-section" select="'test'"/>
  <xsl:param name="nav-section-toc" select="'test'"/>
...
<xsl:call-template name="menu">
  <xsl:with-param name="root" select="$nav-section/navigation/menu"/>
  <xsl:with-param name="toc" select="$nav-section-toc"/>
</xsl:call-template>
...
You need to pass this param through the templates (important!!!) till
you find:
<xsl:for-each select = "//tocitems/tocitem"/>
That should then read:
<xsl:for-each select = "$toc//tocitems/tocitem"/>

HTH

salu2
-- 
thorsten

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