This project has retired. For details please refer to its Attic page.
forrest:viewsHelper - style your site
MyGroup > MyProject
spacer
Font size:      

forrest:viewsHelper - style your site

This plugin is a ViewHelper implementation used by the view plugin.

How to create your own implementation

Diwaker Gupta wrote: "Of course, we can have a good debate on whats the best way to generate XHTML content for the tabs to make it "most amenable" to CSS skinning. Personally, I would just output each tab in its own div element, with class attributes denoting the selected tab. One can then use CSS to structure/color them appropriately."

Note
All following explanations/steps assume you use the default configuration of forrest.

Ok, you may want to try another feature that is coming with forrest:views.

Create your own contract implementation

  1. Create in src/documentation the folder resources/templates. ...or more generally speaking create ${project.resources-dir}/templates.
  2. Copy {this.plugins.path}/resources/templates/nav-main.ft to this folder.
  3. Add after the <xsl:template name="nav-main-body"/> something like
<xsl:template match="ul[@id='nav-main']">
<div id="nav-main">
  <xsl:apply-templates select="li"/>
</div>
</xsl:template>
<xsl:template match="li[not(@class)]">
<div class="base-not-selected">
  <xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="li[@class='current']">
<div class="current">
  <xsl:apply-templates/>
</div>
</xsl:template>
        
  1. Change the css in <xsl:template name="nav-main-css">. I tried but the result is not nice. If you succeed please change the name of the contract to "nav-main-div", add the patch to the issue-tracker and I add the new contract to the themer plugin. ;-)

You can find more implementations in {this.plugins.path}/resources/templates/.