forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CFAS Webmaster <>
Subject Re: Help with new templates
Date Tue, 02 Aug 2005 00:49:36 GMT

  It does to some degree.  I had found the foo.xml/foo.fv, default.fv 
mapping and that helps immensely.  I think the part that I'm not 
understanding is the other <forrest:hook> bit.

Should that content be in another file and included somehow?  I see, but 
do not understand, how the leftbar is pieced together because forrest 
generates it, specifically with the nav-section contract.  I just tried 
hacking the sitemap-contact.ft contract, calling it extra-info.ft and 
placing this into index.fv:

                <forrest:hook name="content">
                    <forrest:contract name="content-title"/>
                    <forrest:contract name="content-abstract"/>
                    <forrest:contract name="content-minitoc"/>
                    <forrest:contract name="content-main"/>
                <forrest:hook name="rightbar">
                    <forrest:contract name="extra-info"/>

The content bit comes from your default.fv and I've added the extra-info 
piece.  The extra-info contract is a bit large and I don't know how much 
stuff is normally posted to the list as far as code goes.  The core part 
of the template goes like this:

        <xsl:stylesheet version="1.1"
            <xsl:template name="extra-info-body">
              <xsl:if test="extra.xml">
                <xsl:for-each select="extra.xml">
            |start extra-info
    |end content-main


Where extra.xml is where I've stuffed the information for the third 
column.  Does this look like a valid approach where I just have some 
syntax wrong, or have I completely missed what's supposed to be going on 


Diwaker Gupta wrote:

>On Sunday 31 July 2005 6:10 pm, CFAS Webmaster wrote:
>>  Is anyone would be willing to help me through the process of making
>>this work properly?  The original site that I'm trying to emulate is:
>>, the new site is
>glad to help where I can :)
>>  Essentially, I'd like the third column flush against the header.  I
>>think it'll work if I can convince Forrest to place that column in its
>>own <div id="rightbar">.  Unfortunately since it's part of the source
>>file, it's part of <div id="content">.  I looked briefly at writing a
>>new contract but I don't know enough about them to know if that's even a
>>valid approach.
>Have you read the documentation on views?
>IIUC, all you need to do is put some of the content (like your quicklinks and 
>news items on the old site) within another <forrest:hook> in the view file 
>for the front page (most likely it should be named index.fv) and thats it!
>Just in case you didn't know, you can specify per file as well as per 
>directory view configs. So, each page can have a different layout, all pages 
>in the same directory can have a different layout and so on!
>The naming convention is that for a file named foo.xml, Forrest will look for 
>foo.fv, and then default.fv in the directory containing foo.xml, and then the 
>project wide default.fv and then finally the default.fv that ships with 

View raw message