nettulf - 7:50 pm on Feb 6, 2013 (gmt 0)
That should work. :)
If the include is used in all pages, and you want the canonical for ONLY the homepage, you still could put it in an if-statement like above and skip the <?else:?>. This test if the current filename is "index" - that is the homepage.