Velocity Macro

Is it possible to have a Velocity macro return a Navon, for example, or does it always return string data?

Nick.

You can return a node…
eg, one macro that i created that i find useful…:


## returns the node of the slot in the given slot number
## returns 'false' if it doesn't find it or if the number
## of items in the slot is less than the given node Number
## 01/23/2008
#macro(vtGetSlotNode $slotname $params $nodeNum $returnNode)
  #initslot($slotname $params)
  #if ($sys.part.render)
	#if($sys.currentslot.slot)
		#set($numRel = $sys.currentslot.relresults.size())
		#set($nodeNum = $tools.math.toNumber($nodeNum))
		#if($nodeNum > $numRel)
			#set($returnNode = 'false')
		#else
          #foreach($relresult in $sys.currentslot.relresults)
			#if($nodeNum == $velocityCount)
			  #set($returnNode= $relresult.getNode())
			#end
		  #end
		#end
    #end  
  #end
  #endslot($slotname)
#end

In a like manner you could pass the navigation submenu and pass back the navon (or whatever else you may want to do).

I’ve got it working just as I wanted now.

Thanks.