You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Keith Seim <ke...@kjsdesigns.com> on 2003/07/28 22:53:08 UTC

importing files into screen templates

Hi

I have a screen template, and I have another vm file that I want to 
import as a component of that screen template (similar to how the layout 
template imports navigations into the required area).

Can anyone give me the script I use to reference and import the 
component file.  I'll give an example of what I want:

File: OneFile.vm
<----------------------------
Some text
[import call to OtherFile.vm]
Some more text
--------------------------->

File: OtherFile.vm
<-------------------------
Some text that I want to import as component in a number of screens.
-------------------------->

Thanks
___________________________________
Keith Seim • http://kjsdesigns.com


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


Re: importing files into screen templates

Posted by Keith Seim <ke...@kjsdesigns.com>.
Thanks a lot Edgar - Sometimes I can't figure out what's a velocity 
feature and what's a turbine feature.


On Monday, July 28, 2003, at 06:10  PM, Edgar González González wrote:

> Keith,
>
> You can review the Velocity User Guide:
> http://jakarta.apache.org/velocity/user-guide.html#Include
>
> But basically you have two choices:
>
> a) #parse( "MyTemplate.vm" ): The #parse script element allows the 
> template
> designer to import a local file that contains VTL. Velocity will parse 
> the
> VTL and render the template specified.
>
> b) #include( "MyTemplate.vm" ) : The contents of the file are not 
> rendered
> through the template engine. For security reasons, the file to be 
> included
> may only be under TEMPLATE_ROOT.
>
>
> Hope this help you
>
> ----------------------------------------------------------------------------
> Edgar González González
> VALHALLA Project, s.a.
> Chief Technology Officer
> Web: www.valhallaproject.com <http://www.valhallaproject.com>
> E-mail: egg@valhallaproject.com
> Phone: +58-212-242.4379 / 6662 / 4055 / 6475
> Fax: +58-212-242.6809
> "The limits of my language mean the limits of my world."
> Ludwig Wittgenstein
> ----------------------------------------------------------------------------
>
>
>
> -----Mensaje original-----
> De: Keith Seim [mailto:keith@kjsdesigns.com]
> Enviado el: lunes, 28 de julio de 2003 04:53 p.m.
> Para: turbine-user@jakarta.apache.org
> Asunto: importing files into screen templates
>
>
> Hi
>
> I have a screen template, and I have another vm file that I want to
> import as a component of that screen template (similar to how the layout
> template imports navigations into the required area).
>
> Can anyone give me the script I use to reference and import the
> component file.  I'll give an example of what I want:
>
> File: OneFile.vm
> <----------------------------
> Some text
> [import call to OtherFile.vm]
> Some more text
> --------------------------->
>
> File: OtherFile.vm
> <-------------------------
> Some text that I want to import as component in a number of screens.
> -------------------------->
>
> Thanks
___________________________________
Keith Seim • http://kjsdesigns.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>


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


RE: importing files into screen templates

Posted by Edgar González González <eg...@valhallaproject.com>.
Keith,

You can review the Velocity User Guide:
http://jakarta.apache.org/velocity/user-guide.html#Include

But basically you have two choices:

a) #parse( "MyTemplate.vm" ): The #parse script element allows the template
designer to import a local file that contains VTL. Velocity will parse the
VTL and render the template specified.

b) #include( "MyTemplate.vm" ) : The contents of the file are not rendered
through the template engine. For security reasons, the file to be included
may only be under TEMPLATE_ROOT.


Hope this help you

----------------------------------------------------------------------------
Edgar González González
VALHALLA Project, s.a.
Chief Technology Officer
Web: www.valhallaproject.com <http://www.valhallaproject.com>
E-mail: egg@valhallaproject.com
Phone: +58-212-242.4379 / 6662 / 4055 / 6475
Fax: +58-212-242.6809
"The limits of my language mean the limits of my world."
Ludwig Wittgenstein
----------------------------------------------------------------------------



-----Mensaje original-----
De: Keith Seim [mailto:keith@kjsdesigns.com]
Enviado el: lunes, 28 de julio de 2003 04:53 p.m.
Para: turbine-user@jakarta.apache.org
Asunto: importing files into screen templates


Hi

I have a screen template, and I have another vm file that I want to
import as a component of that screen template (similar to how the layout
template imports navigations into the required area).

Can anyone give me the script I use to reference and import the
component file.  I'll give an example of what I want:

File: OneFile.vm
<----------------------------
Some text
[import call to OtherFile.vm]
Some more text
--------------------------->

File: OtherFile.vm
<-------------------------
Some text that I want to import as component in a number of screens.
-------------------------->

Thanks
___________________________________
Keith Seim • http://kjsdesigns.com


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




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