forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ferdinand Soethe <samm...@soethe.net>
Subject Re: [views] Survival guide and setup
Date Mon, 06 Jun 2005 18:15:53 GMT
Comments from trying it:

Thorsten Scherler wrote:

> I will write a howto on that I promise! For now try the following
> survival guide:

> *setup*
> 1) The first step is to build the view and the viewHelper plugins (that
> will be easier in the future, we promise)
> cd {forrest-trunk}
> svn up
> cd whiteboard/plugins/org.apache.forrest.plugin.internal.view/
> ant local-deploy
> cd ../org.apache.forrest.plugin.output.viewHelper.xhtml/
> ant local-deploy

> 2) Then seed an new project:
> cd ~/src/newSeed
> forrest seed

> 3) Then add the plugins to the forrest.properties:
> project.required.plugins=org.apache.forrest.plugin.output.viewHelper.xhtml,org.apache.forrest.plugin.internal.view

> 4) Change the project skin to leather-dev (we exchanging only
> site2xhtml.xsl of that skin by the plugins and some contracts are based
> on e.g. document2html.xsl output of leather-dev)
> project.skin=leather-dev

> 5) prepare default.fv directory (project.conf-dir)
> mkdir src/documentation/conf

> 6) Now you have finished the preparation and the setup to finally try
> forrest run

Wow. Works like a charm. Had it running in no time. Fun!


> Note: When developing styles with views 'forrest run' is the quickest
> way. You will see you do not have to build your project to see the
> changes on your pages when working with *.fv. 

> *changing views* - *.fv
> For changing the view of a page, you can start by copying
> http://svn.apache.org/viewcvs.cgi/*checkout*/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/views/default.fv
> to e.g. index.fv. This view *has to* be in the same dir as the document
> (e.g. index.xml). This is defined in forrest.properties by
> #project.xdocs-dir=${project.content-dir}/content/xdocs

> To change the default view of your project you have to create a
> default.fv (copy above mentioned) in the dir defined in the
> forrest.properties by
> #project.conf-dir=${project.content-dir}/conf

> I now assume you have the following files new added to the seed (if you
> did not change any default props):
> src/documentation/conf/default.fv
> src/documentation/content/xdocs/index.fv

> Now the rule for the view matching is 
> 1.) page specific view (e.g. index.fv)
> 2.) default view (src/documentation/conf/default.fv)

How about a per directory view?


> Lets try this rule by changing in index.fv:
> <!--<forrest:contract name="grouplogo"/>-->
> save and test:
> http://localhost:8888/index.html

> You will find that the grouplogo will not be rendered. Now let test how
> the other pages look like:
> http://localhost:8888/samples/sample.html

> You see again the grouplogo. To change it in all pages we have to edit
> src/documentation/conf/default.fv.

This doesn't work with the current skin because their is no group
logo. Commenting out

<forrest:hook name="export-link">
                <forrest:contract name="txt-link"/>
                <forrest:contract name="pdf-link"/>
            </forrest:hook>

works just as well.


> Now all pages do not have the grouplogo. For further information see
> e.g.
> http://marc.theaimsgroup.com/?l=forrest-dev&m=111800598325769&w=2

See above.




> *CSS support*
> Note: Right now we still have the css generation out of contracts but
> that will be history as soon we can provide a default.css that is doing
> this job. You will find in samples/sample.html (as indicator):
> <link href="../skin/contracts-samples/sample.css" rel="stylesheet"
type="text/css" />>

> Now to add your own css to the view:
> http://marc.theaimsgroup.com/?t=111360815400001&r=1&w=2&n=7

> Basically you have to add 
> <forrest:css url="someCss.css"/>
> to the view to add your own css-stylesheet.

> This tag has to be direct son from forrest:view!

> In the resource.xmap of the plugins we defined a matching rule for
> custom css:
> <map:when test="{project:skins-dir}{path}/{name}.css">

> That means e.g.
> <forrest:css url="prosimii-screen-alt.css"/>

> would expect (with default values) 
> src/documentation/skins
>  |-- css
>      `-- prosimii-screen-alt.css

> For programming contracts see my recent thread and the upcoming how-to
> (where you can find a lot of what you just read) ;-).

You have lost me on the CSS. How is this done, what is each step
about. Would love to understand that.

Thanks for explaining.

Ferdinand


--
Ferdinand Soethe


Mime
View raw message