On 13/06/07, Thorsten Scherler <[EMAIL PROTECTED]> wrote:
On Tue, 2007-06-12 at 23:00 +0100, Ross Gardler wrote:
> How can I change the behavior of a dispatcher contract depending on
> the page being requested?
>
> Specifically, how can I make a template be used for a request of
> "projectDetails/foo.html" and "projectDetails/foo/bar.html", but not
> for "projectDetails/index/byCategory.html"?
1) implementing in
${project.resources-dir}/structurer/url
mkdir -p projectDetails/foo
mkdir -p projectDetails/index
vi projectDetails/foo/${dispatcher.theme}.fv
vi projectDetails/index/${dispatcher.theme}.fv
Important is that the template name is equal to ${dispatcher.theme}!
This doesn't work, there must be a bug. I've created a test case in
the dispatcher docs and will file a bug report in a moment.
2) implementing presentation logic in the main ${dispatcher.theme}.fv
like:
<jx:if test="${!
getRequest.contains('projectDetails/index/byCategory')}">
<forrest:contract name="myContract"/>
</jx:if>
Ahhh - of course. So obvious when it's pointed out.
Thanks,
Ross