WordPress
<link rel="canonical" href="<?php echo get_permalink($post->ID); ?>" />
Blogger
<link rel='canonical' expr:href='data:blog.url'/>
Moveable Type
<mt:Unless name="system_template"> <mt:If tag="ArchiveType"> <$mt:ArchiveLink with_index="1" setvar="canonical_url"$> <mt:Else name="tmpl_self"> <mt:Link template="$tmpl_self" with_index="1" setvar="canonical_url"> </mt:If> <mt:If name="canonical_url"><link rel="canonical" href="<$mt:Var name="canonical_url"$>" /></mt:If> </mt:Unless>
[SOURCE]
TextPattern
<link rel="canonical" href="<txp:if_individual_article> <txp:permlink /> <txp:else /> <txp:if_section name=",default" > <txp:site_url /> <txp:else /> <txp:site_url /> <txp:section /> </txp:if_section> </txp:if_individual_article>" />
Executing canonical tags on these next CMS’s varries widely on how each is setup. Therefore, use the following plugins to get it just right.
Drupal & Magento
http://yoast.com/canonical-url-links/
Joomla!
http://extensions.joomla.org/search?q=canonical
ExpressionEngine
http://expressionengine.com/archived_forums/viewthread/107051/