cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Collen <colle...@umn.edu>
Subject Re: Pass sitemap params to "xslt" transformer?
Date Wed, 08 Oct 2003 22:36:57 GMT
Sonny Sukumar wrote:

> 
>> From: "Horsfield, Peter A." <peter.horsfield@ngc.com>
>>
>> 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! :)

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.


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.

> 
> Hopefully it makes more sense now. :-)
> 
>> All the best,
>>
>> Peter


Regards,

Tony


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message