You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Vecchio Fabrizio <ve...@payroll.it> on 2007/10/25 11:38:57 UTC

Common decorator macros

Hi,
i'm writing two decorator for jetspeed and i need to have
some "common" code. I use velocity decorators and i have
created:

- commons/css/...
- commons/decorator-macros.vm
- layout1/..
- layout2/..

Now, on layout1/header.vm i need to parse commons decorator-macros.vm
to do this on the top i've writed :

#parse($layoutDecoration.getResource("/commons/decorator-macros.vm"))
#parse($layoutDecoration.getResource("decorator-macros.vm"))

But on jetspeed startup only the layout1/decorator-macros.vm are parsed
the other one start to be parsed only when i modify the header.vm page
at runtime (on the log i see JetspeedVelocityViewServlet - 
initVelocity() only on layout1/decorator-macros.vm)

I need to know where i can put commons macros.

Thanks,
VF

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Common decorator macros

Posted by Vecchio Fabrizio <ve...@payroll.it>.
Vecchio Fabrizio ha scritto:
> David Sean Taylor ha scritto:
>>
>> On Oct 25, 2007, at 2:38 AM, Vecchio Fabrizio wrote:
>>
>>> Hi,
>>> i'm writing two decorator for jetspeed and i need to have
>>> some "common" code. I use velocity decorators and i have
>>> created:
>>>
>>> - commons/css/...
>>> - commons/decorator-macros.vm
>>> - layout1/..
>>> - layout2/..
>>>
>>> Now, on layout1/header.vm i need to parse commons decorator-macros.vm
>>> to do this on the top i've writed :
>>>
>>> #parse($layoutDecoration.getResource("/commons/decorator-macros.vm"))
>>> #parse($layoutDecoration.getResource("decorator-macros.vm"))
>>>
>>> But on jetspeed startup only the layout1/decorator-macros.vm are parsed
>>> the other one start to be parsed only when i modify the header.vm page
>>> at runtime (on the log i see JetspeedVelocityViewServlet - 
>>> initVelocity() only on layout1/decorator-macros.vm)
>>>
>>> I need to know where i can put commons macros.
>>>
>> We have been putting them by convention in Jetpeed's 
>> WEB-INF/jetspeed-macros.vm
>> This is all configured in WEB-INF/velocity.properties:
>>
>> velocimacro.library = /WEB-INF/jetspeed_macros.vm
>>
>> To override these settings I usually override the configuration in a 
>> custom build
>>
>>
>>
>>
> Ok thanks this can solve my problem but there is not a way to specify
> more than one "velocimacro.library" file to keep standard 
> jetspeed_macros.vm intact ?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org

Cut away my last question (very stupid) i see velocity documentation and
i've found that can be specified as coma separated.
Thanks a lot,
VF

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Common decorator macros

Posted by Vecchio Fabrizio <ve...@payroll.it>.
David Sean Taylor ha scritto:
> 
> On Oct 25, 2007, at 2:38 AM, Vecchio Fabrizio wrote:
> 
>> Hi,
>> i'm writing two decorator for jetspeed and i need to have
>> some "common" code. I use velocity decorators and i have
>> created:
>>
>> - commons/css/...
>> - commons/decorator-macros.vm
>> - layout1/..
>> - layout2/..
>>
>> Now, on layout1/header.vm i need to parse commons decorator-macros.vm
>> to do this on the top i've writed :
>>
>> #parse($layoutDecoration.getResource("/commons/decorator-macros.vm"))
>> #parse($layoutDecoration.getResource("decorator-macros.vm"))
>>
>> But on jetspeed startup only the layout1/decorator-macros.vm are parsed
>> the other one start to be parsed only when i modify the header.vm page
>> at runtime (on the log i see JetspeedVelocityViewServlet - 
>> initVelocity() only on layout1/decorator-macros.vm)
>>
>> I need to know where i can put commons macros.
>>
> We have been putting them by convention in Jetpeed's 
> WEB-INF/jetspeed-macros.vm
> This is all configured in WEB-INF/velocity.properties:
> 
> velocimacro.library = /WEB-INF/jetspeed_macros.vm
> 
> To override these settings I usually override the configuration in a 
> custom build
> 
> 
> 
> 
Ok thanks this can solve my problem but there is not a way to specify
more than one "velocimacro.library" file to keep standard 
jetspeed_macros.vm intact ?

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Common decorator macros

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Oct 25, 2007, at 2:38 AM, Vecchio Fabrizio wrote:

> Hi,
> i'm writing two decorator for jetspeed and i need to have
> some "common" code. I use velocity decorators and i have
> created:
>
> - commons/css/...
> - commons/decorator-macros.vm
> - layout1/..
> - layout2/..
>
> Now, on layout1/header.vm i need to parse commons decorator-macros.vm
> to do this on the top i've writed :
>
> #parse($layoutDecoration.getResource("/commons/decorator-macros.vm"))
> #parse($layoutDecoration.getResource("decorator-macros.vm"))
>
> But on jetspeed startup only the layout1/decorator-macros.vm are  
> parsed
> the other one start to be parsed only when i modify the header.vm page
> at runtime (on the log i see JetspeedVelocityViewServlet -  
> initVelocity() only on layout1/decorator-macros.vm)
>
> I need to know where i can put commons macros.
>
We have been putting them by convention in Jetpeed's WEB-INF/jetspeed- 
macros.vm
This is all configured in WEB-INF/velocity.properties:

velocimacro.library = /WEB-INF/jetspeed_macros.vm

To override these settings I usually override the configuration in a  
custom build