Forgive me if this is a double post, I posted this earlier today and nothing appeared.
I've been heckled by my SEO person about duplicate URLs for the same content. This occurs when a dmHTML content type is referenced through a teaser template.
eg: /about-us (the dmNavigation furl) & /about-us/about-us (dmHTML)
My initial reaction was to put a canonical link tag in the header for a dmHTML content type. (and I did)
<cfif lcase(stobj.typename) EQ 'dmhtml'>
<skin:buildLink objectID="#request.navid#" r_url="theURL"/>
<cfoutput><link rel="canonical" href="http://#cgi.SERVER_NAME##theURL#"/></cfoutput>
</cfif>
But I also thought fixing the issue at the source would be a good idea, ie any teasers for dmHTML.
<cfset tmpNavid = application.fapi.getContentType("#stobj.typename#").getNavID(objectid="#stobj.objectid#", typename="#stobj.typename#", stobject="#stobj#") />
<skin:buildLink objectID="#tmpNavid#">
<skin:view objectid="#stobj.teaserImage#" typename="dmImage" template="displayTeaserImage" />
</skin:buildLink>
Now all the teasers for dmHTML now reference the navigation furl and not it's own.
If anyone has a better solution, or if I'm making things difficult for myself please let me know. Most things I do originated from molio template way back when so some of the newer skeletons (fandango) might contain newer tricks.
Regards
Phil