forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: [views] Dir specific view
Date Fri, 08 Jul 2005 00:15:35 GMT
On Thu, 2005-07-07 at 22:32 +0200, Thorsten Scherler wrote:
> On Thu, 2005-07-07 at 16:48 +0100, Ross Gardler wrote:
> > Thorsten Scherler wrote:
> > > I added the dir specific view matcher to the location map. Will try to
> > > merge tomorrow the view specific stuff back to trunk. 
> > 
> > OK, I'm using this now, just playing to start with. Here is what I want 
> > to do:
> > 
> > I'm using the branding contracts. On the home page I just have the 
> > branding-tagline-name contract, but on subsections (i.e. 
> > sub-directories) I want to include a branding-tagline-tagline contract 
> > as well. All other parts of the view remain the same.
> > 
> 
> http://marc.theaimsgroup.com/?l=forrest-dev&m=110107619329543&w=2
> 
> "You can as well mix atomic parts with grouping templates.
> <forrest:view output-format="xhtml, fo" name="intro">
>   <forrest:hook name="intro">
>    <forrest:nugget name="grouplogo"/>
>    <forrest:call-template name="sports"/>
>   </forrest:hook>
> </forrest:view>"
> 
> The nuggets/fbits are called contracts.
> 
> This feature is not yet implemented but like you see IMO that will have to come pretty
soon.
> It is easy to implement because it is just a transformation to a xinclude tag away. ;-)

I could not resist and implemented this in trunk. Please test and report
back. 

You can group elements to a template and call it from any view. e.g. 
  <forrest:hook name="export-link"> 
    <forrest:contract name="content-txt-link"/> 
    <forrest:contract name="content-pdf-link"/> 
  </forrest:hook> 
  can be called as 
  <forrest:call-template name="export-link"/> 
  when saved as 
  {project:resources}/templates/export-link.vt.xml 

An example is added with -r209682.
http://svn.apache.org/viewcvs?rev=209682&view=rev

Have fun.

salu2
-- 
thorsten

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


Mime
View raw message