velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Ducker <and...@ducker.org.uk>
Subject Re: Stopping parsing
Date Mon, 13 Feb 2012 17:45:39 GMT
On 29/01/2012 21:07, Guillaume Polet wrote:
> What about #stop() ?
> http://velocity.apache.org/engine/devel/user-guide.html#Stop
>
> Otherwise, there is also a #parse macro that can help you slice your
> templates into smaller ones and organize a little bit more.

#stop for some reason included bits of text including the # character in 
its output, even if they were from after it (and as the page had several 
bits of jquery, that wasn't good).

But putting together a page with:

<!DOCTYPE HTML>

#if(!$userdata.loggedIn)
   #parse ( "ResetToNotLoggedIn.vm" )
#else
   #parse ( "LoggedInMainPage.vm" )
#end

worked perfectly, and is neater than having it all in one file.

Thanks!

Andy

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


Mime
View raw message