[xwiki-users] Inserting velocity macro output into wiki numbered lists (#)

Lijour, Marc (EDU) Marc.Lijour at ontario.ca
Fri Jan 5 23:29:58 CET 2007


Thank you Sergiu. For some reason I was under the impression that
velocity keywords (like #end) must start with a '#' AND start the line. 
And it works!

	-----Original Message-----
	From: Sergiu Dumitriu [mailto:sergiu.dumitriu at gmail.com] 
	Sent: January 5, 2007 4:40 PM
	To: xwiki-users at objectweb.org
	Subject: Re: [xwiki-users] Inserting velocity macro output into
wiki numbered lists (#)
	
	
	Hi,
	
	The problem is in your code. By the way the different rendering
engines are called, first the velocity macro is executed, resulting in:
	
	# apple
	# oranges
	# <span class="mystuffhere">my preference goes to:</span> 
	 mangos
	# guanavana
	
	So now you see the problem. The "mangos" are on the next line,
making the list filter believe that the list has ended. You can fix this
by removing the EOL from the macro, like this: 
	
	#macro( print $stuff)
	<span class="mystuffhere">$stuff</span>#end
	
	Notice that the #end is right after the </span>.
	
	
	On 1/4/07, Lijour, Marc (EDU) <Marc.Lijour at ontario.ca> wrote: 


		Is there a way we can do something like the following? 

		#macro( print $stuff) 
		<span class="mystuffhere">$stuff</span> 
		#end 

		print=velocity:print:stuff 

		and somewhere in a list: 

		# apple 
		# oranges 
		# {print: "my preference goes to: "} mangos 
		# guanavana 


		When I tried it, it breaks the list and restarts
numbering (although a span is inlined). 

		Marc Lijour 

		<<Lijour, Marc (EDU).vcf>> 



		--
		You receive this message as a subscriber of the
xwiki-users at objectweb.org mailing list.
		To unsubscribe: mailto:
xwiki-users-unsubscribe at objectweb.org
		For general help: mailto: sympa at objectweb.org
<mailto:sympa at objectweb.org> ?subject=help
		ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws 
		
		
		
		


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xwiki.org/pipermail/users/attachments/20070105/9e5197c6/attachment-0001.htm 


More information about the users mailing list