cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Edwards <tedwa...@civica.com.au>
Subject Re: Accessing global config values in sitemap through flow scripts
Date Thu, 15 Jul 2004 23:23:09 GMT
Hi Kranga,
If you look in the slide sample's flow, its opening stanza has some code 
that extracts the globals form the sitemap, to wit:

//Obtain reference to the global section of the sitemap:
var global = cocoon.getComponent(InputModule.ROLE + 
"Selector").select("global");
//get global values from the sitemap
var namespace = global.getAttribute("namespace",null,null);
var base = global.getAttribute("base",null,null);

Given that you have a config section like this:
     <global-variables>
       <namespace>cocoon214</namespace>
       <base>/civica_slide</base>
     </global-variables>

Hope this helps.

Regards,

Tony


kranga wrote:

>Can someone help??
>
>  
>
>>How can I access values defined in the <global-variables> section from
>>    
>>
>a
>  
>
>>flow script and from jx-templates?
>>
>>Thanks
>>K
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>  
>

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


Mime
View raw message