From: Tony Collen <[EMAIL PROTECTED]>

Sonny Sukumar wrote:


From: "Horsfield, Peter A." <[EMAIL PROTECTED]>

Ok you're right; and Tony picked up on the right
solution as far as I can see, because you need to
target the URI as a whole and embed it inside a
document. Thats just the way cinclude works.


Yeah, so maybe the requestURI input module is the way to go, but I can't find an example of its use. It has to be like {requestURI:???} right? Just need to fill in the "???" :-) I didn't see any example in the JavaDoc documentation for the class or in Wiki under "InputModules"

Inputmodule docs are coming, I swear! :)

Lol, thanks! :-)



try


{requestURI:requestURI}, looking at the code for the module, that appears to be the only thing returned. You might also be able to go

{requestURI:*} if you are lazy.

Hehe I'm not *that* lazy. ;-)




Code taken from the module:

====

    final static Vector returnNames;
    static {
        Vector tmp = new Vector();
        tmp.add("requestURI");
        returnNames = tmp;
    }
====

as well as:

====
public Object getAttribute( String name, Configuration modeConf, Map objectModel ) throws ConfigurationException {


String uri = ObjectModelHelper.getRequest(objectModel).getSitemapURI();

        if (uri.startsWith("/")) {
            uri = uri.substring(1);
        }

        return uri;
    }
====

<snip/>

Hehe I wish I could. I've used <map:aggregate> nicely in other situations, but this is a true template situation. I have an XHTML template with a center content portion that needs to be filled in, as well as a navigation menu that needs to be filled in. An additional twist is that the nav menu configuration (which shows you where you are within the site) depends on what the center content is. And the center content depends, in turn, on the request URI.

You may also want to look into the CInclude transformer for aggregating content.



Yeah, that's what I'm planning to use. The interdependence between the nav menu and the center content seems to complicate things though, so I'm trying to introduce a transform stage to alleviate the problem. For example, I'll embed tags like these in my XHTML doc:


<mysite:content replace-with="navigationMenu"/>
<mysite:content replace-with="centerContent"/>

(I just used the "mysite" prefix so as not to conflict with the surrounding XHTML tags.)

Now, when a request comes in like "http://www.mysite.com/requestUri?someParam=123";, then I want to take the "requestUri?someParam=123" and end up with:

<cinclude:include src="cocoon:/requestUri?someParam=123"/>

and

<cinclude:include src="cocoon:/navigationMenu/requestUri?someParam=123"/>

(I'm not sure if I'll need to pass the request params to generate the nav menu, but maybe).

Does it seem workable to you? Assuming it is, I'm a little worried that this transform will cause performance to suffer because it needs to be done for almost *every* customer-facing page. That's a ton of copying of XHTML tags from one pipeline stage to the next, when only 2 tags are changing.

Sonny

_________________________________________________________________
Help protect your PC. Get a FREE computer virus scan online from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to