forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: [Structurer] Toc in navbar with pelt theme
Date Tue, 25 Oct 2005 22:18:05 GMT
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)


Mime
View raw message