forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject Re: overrides of forrest:properties/forrest:propery in contracts
Date Thu, 18 Sep 2008 13:16:18 GMT
On Thu, 2008-09-18 at 15:47 +0300, Sjur Moshagen wrote:
> Den 18. sep. 2008 kl. 14.48 skrev Gavin:
> 
> >> But that didn't work, the one in the panel came through. What am I
> >> doing wrong?
> >>
> >> I could not find any relevant info on the forrest site or in the mail
> >> archives.
> >
> > Usually to override them, recreate the tree in your project and just  
> > copy
> > and change the files you want to there.
> >
> > so
> > yourproject/src/documentation/resources/themes/common/panels/common- 
> > fo.panel
> > .xml
> 
> In the old skins-based system you would modify skinconfig.xml, and in  
> dispatcher you would copy and change this panel file.
> 
> To me this looks like overkill in both case, but more so in the  
> dispatcher. What would it take to actually make it possible to do what  
> I did, ie just set the properties I want in the forrest.properties.xml  
> file?
> 

In the light of the dispatcher I happy that this came up. The old
skinconf is the root cause of contracts like
name="page-footer-copyright" and the consequences. Having xml based
properties is memory consuming.

> in my forrest.properties.xml file:
> 
>    <forrest:property name="copyright">
>      <year inception='true'>2004</year>
>      <vendor>Divvun</vendor>
>      <url>http://Divvun.no</url>
>      <msg>Atterhald om alle rettar.</msg>
>      <symbol>©</symbol>
>      <property></property>
>    </forrest:property>

<forrest:property name="copyright"> from the forrest.properties.xml are
only valid with a @value and no sons!

Meaning if you want to configure a contract via forrest.properties.xml
(which I think should be the preferred method of configuration) you need
to rewrite the contract to accept string param instead of DOM param (xml
snippets).

<forrest:property name="copyright.year" value="2008"/>

and instead of  <xsl:param name="copyright"/> you need to make the
request to $default/../*[@name='copyright.year']


salu2


> Best regards,
> Sjur
> 
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Mime
View raw message