On 2011-04-13 David Crossley <[email protected]> said: > Vicent Mas wrote: > > I've updated my local repo and checked that the 'starts-with' attribute > > stuff of motd is not available with dispatcher. I've customised the > > content-motd- page.contract.xml that comes with dispatcher adding some > > 'starts-with' stuff. I've used > > $FORREST_HOME/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl as a > > guide (not sure if it is the best choice but it has been good enough for > > me). Now the motd contract works as I want. > > > > So again thanks for your help, > > Yes the "pelt" skin is the one that the Forrest project > keeps up-to-date. It is what the Forrest project website uses. > http://forrest.apache.org/docs/dev/status-themes.html > So that is the correct one to base your work upon. > > Are you able to provide a patch for Dispatcher? > > -David
Hi,
I've attached the patch to this mail. You can apply it from the FORREST_HOME
like this:
$ patch -p0 <content-motd-page-contract.diff
Please, note that I've not tried to port all motd functionality from
$FORREST_HOME/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl to the
dispatcher contract. I've just picked what I needed to achieve my goal.
That being said, If the patch is fine with you I can attach it to an issue at
jira.
Hope it helps,
Vicent
::
Share what you know, learn what you don't
--- whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/content-motd-page.contract.xml 2011-02-19 18:44:54.000000000 +0100
+++ whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/themer/themes/common/html/my-content-motd-page.contract.xml 2011-04-14 18:03:33.000000000 +0200
@@ -26,7 +26,8 @@
<br />Each option will match a pattern and apply its text. The "pattern"
attribute specifies the pattern to be matched. This can be a specific page,
or a general pattern to match a set of pages, e.g. everything in the
- "samples" directory.</p>
+ "samples" directory.
+ <br />The @starts-with=true anchors the string to the start, otherwise contains.</p>
<p>motd-title :
<br />This text will be added in brackets after the
<html><title> and this can be empty.</p>
@@ -44,10 +45,11 @@
<