You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Klaus FEIMER @ FHTE" <kl...@fht-esslingen.de> on 2004/07/23 09:23:23 UTC

include command

Hello,

perhaps I wrong here, but I have a short question for vm-files. I know 
nothing about vm-files, but for a project we have to include images from 
an other webserver, so I will include the images in a vm-file like I can 
do it in php-file. e.g. I want files such as:

<?
   include("a2_include.php");
   include("http://domain.com/file.php");
 ?>

Can you tell me a code example for vm-files which I can include other 
html-code or images like the example from php-code?

Thank you in advance.

Best regards

-- 
Klaus Feimer



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


Re: include command

Posted by Nathan Bubna <na...@esha.com>.
Klaus said:
> perhaps I wrong here, but I have a short question for vm-files. I know
> nothing about vm-files, but for a project we have to include images from
> an other webserver, so I will include the images in a vm-file like I can
> do it in php-file. e.g. I want files such as:
>
> <?
>    include("a2_include.php");
>    include("http://domain.com/file.php");
>  ?>
>
> Can you tell me a code example for vm-files which I can include other
> html-code or images like the example from php-code?

i'm not sure what you mean by "including images,"  but there are two
directives for "including" local templates ("vm files"), as Will pointed out
to you.

also, for including content (though i don't know about images) from other
servers, you can either use the ImportTool included in VelocityTools
(http://jakarta.apache.org/velocity/tools/view/ImportTool.html) or try digging
up the URLResourceLoader from a contrib directory somewhere (i don't have a
link offhand).

but since you seem to be new to things here, you should first read the User
Guide and figure that out before moving on to VelocityTools or obscure
resource loaders. :)

Nathan Bubna
nathan@esha.com


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


Re: include command

Posted by Will Glass-Husain <wg...@forio.com>.
Hi Klaus,

Have you looked at the Velocity docs?  Try #include or #parse.

http://jakarta.apache.org/velocity/user-guide.html#Include

WILL

----- Original Message ----- 
From: "Klaus FEIMER @ FHTE" <kl...@fht-esslingen.de>
To: <ve...@jakarta.apache.org>
Sent: Friday, July 23, 2004 12:23 AM
Subject: include command


> Hello,
> 
> perhaps I wrong here, but I have a short question for vm-files. I know 
> nothing about vm-files, but for a project we have to include images from 
> an other webserver, so I will include the images in a vm-file like I can 
> do it in php-file. e.g. I want files such as:
> 
> <?
>    include("a2_include.php");
>    include("http://domain.com/file.php");
>  ?>
> 
> Can you tell me a code example for vm-files which I can include other 
> html-code or images like the example from php-code?
> 
> Thank you in advance.
> 
> Best regards
> 
> -- 
> Klaus Feimer
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 

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