forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: Access to the query part of the URL
Date Thu, 02 Mar 2006 23:06:38 GMT
Nigel Hardy wrote:
> (Sorry if this is a Cocoon Q. really, but I am working in Forrest and 
> similar issues arise here from time to time)
> 
> I can happily skin the output of php scripts using redirect-to, the 
> FileGenerator etc. as suggested in the Cocoon documentation and at 
> various times on this list. That works just fine for me. Unfortunately, 
> some of the php scripts I want to use like this take query parts in the 
> URL to set parameters. I can't see how to get hold of those in a matcher 
> or selector. I can catch "this/that/theother.php" and skin it, but how 
> do I get hold of the parameter from "this/that/theother.php?var=42" to 
> feed that to the FileGenerator?
> 
> Help appreciated.

If you are planning on using Forrest to generate static content from 
these PHP scripts I'm afraid you can't. The problem is that '?' is not a 
valid character in filenames. Cocoon therefore rewrites such URLs with 
an '_', which then breaks any static links to that page.

If you intend to use Forrest in dynamic mode then you have no problem.

How? Well, as you say this is a Cocoon question, so best place to look 
is the Cocoon docs. See below for some starting options. Which is right 
for you depends on your use case, but given your question I think the 
RequestModule is what you need. Basically, just do {request:PARAM-NAME}:

One of the RequestModules [1]

The request selector [2]

The request generator [3]

Ross

[1] http://cocoon.apache.org/2.1/userdocs/concepts/modules-ref.html

[2] http://cocoon.apache.org/2.1/userdocs/requestparameter-selector.html

[3] http://cocoon.apache.org/2.1/userdocs/request-generator.html

Mime
View raw message