Useful variables for in template bindings

Hi,

I just thought I’d post here a list of variables I have found useful in bindings of templates, especially in dispatch template for deciding which template should be used to render an item:

[ul]
[li]$sys.site.id.UUID = the ID of the site (e.g. 303)[/li][li]$sys.item.definition.id = the ID of the content type (e.g. 312) of the item being assembled (to produce a page, in the case of a page template, or the item in a slot in the case of a snippet template.) NOTE, if you set up a binding (e.g. $parentcontentid=$sys.item.definition.id) in all page templates, then you can then use them in snippet templates to determine the content type of the “parent” item that contains the slot that the snippet is being assembled in.[/li][li]$sys.item.definition.name = name of the content type (e.g. “rx:rffNews”)[/li][li]$sys.currentslot.slot.GUID.UUID = the ID of the slot that a snippet template is being assembled in.[/li][li]$sys.currentslot.slot.name = the name of the slot that a snippet template is being assembled in.[/li][/ul]
Does anyone have any other variables that they have found useful?

Andrew.

$user.psoFolders.getParentFolderPath($sys.assemblyItem) - Very useful in creating auto slots. Used to gather items in a folder for an archive page.

Example:

$path = $user.psoFolders.getParentFolderPath($sys.assemblyItem)

Velocity code:

#initslot("fitAutoYou24ArchiveSTCPost" "site_path=$rxpath/")	
  #if($sys.currentslot.relresults.size() > 0)
     #foreach( $relresult in $sys.currentslot.relresults )
	<div class="listing first">
             	$rx.doc.extractBody($relresult)
	</div>
      #end
  #end