forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: using Subversion keyword substitution instead of published date in skin navstrip - using Forrest 0.8
Date Tue, 15 May 2007 01:29:23 GMT
Brolin Empey wrote:
> 
> Here is my plan:
> 
> 1. Copy pelt and common skins to my Forrest site

You should not need to copy the "common".

> 2. Make needed changes to my local copies of above skins
> 3. Get my changes committed to SVN, in order to simplify future
> Forrest upgrades, reduce duplication of custom files between my
> multiple Forrest sites, and possibly help other Forrest users

No, the project will not be adding copies of skins
to SVN.

If you make your changes optional in the pelt skin
then yes we can add them.

> Right now I am stuck at step 2.
> 
> I decided that it would be better to make a user-set variable to
> control whether to suppress the "Last Modified" text in the pelt
> skin's header and footer.  I used an xsl:choose element to emulate an
> if/else construct.  An xsl:when element tests a skinconfig variable
> named "disable-last-published".

Follow how that is done with other similar "disable-" variables.
See below.

> The problem is that I do not know where to declare user-defined skin
> variables such as "disable-last-published".  I cannot declare my
> variable in skinconf.xml, because the name of my variable is not
> included in the list of legal elements in the skinconfig DTD.
> Furthermore, it appears that I would have to modify some other skin
> files in order for the skin to make my variable available for testing
> in my xsl:when element.

Thorsten explained in another email that you need to
add to the skinconf DTD.

> Initially I was going to declare my variable in forrest.properties,
> but I did not know what name to use.  I tried setting
> "disable-last-published=true" but this did not seem to work.

To incorporate this in the pelt skin, you need to follow
how other default properties get set. Search the code
and the mailing lists.

Search the code for one of the other "disable-" variables:
find . -type f | xargs grep "disable-compliance-links" | grep -v "\.svn"

e.g. among other things, this show that you need to add to
main/webapp/skins/common/skinconf.xsl ...

As Thorsten says, you might prefer the Dispatcher.

-David

> I know my changes to the pelt skin work because I made the changes
> unconditional at first.  However, now I am trying to get both the
> variable declaration and the conditional xsl template working.  I
> realise this is a poor idea since I am dealing with 2 unknowns, but I
> did not anticipate getting sidetracked by  searching for the right
> place to declare my variable.
> 
> Thanks,
> Brolin

Mime
View raw message