[geeklog-cvs] geeklog: Added canonical link to article/printable.thtml

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Mar 21 13:50:06 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c38f594e6af1
changeset: 6844:c38f594e6af1
user:      Dirk Haun <dirk at haun-online.de>
date:      Sat Mar 21 16:01:39 2009 +0100
description:
Added canonical link to article/printable.thtml

diffstat:

2 files changed, 6 insertions(+), 2 deletions(-)
public_html/article.php                                 |    7 +++++--
public_html/layout/professional/article/printable.thtml |    1 +

diffs (28 lines):

diff -r 619109d9b69f -r c38f594e6af1 public_html/article.php
--- a/public_html/article.php	Sat Mar 21 15:01:34 2009 +0100
+++ b/public_html/article.php	Sat Mar 21 16:01:39 2009 +0100
@@ -209,8 +209,11 @@
             $story_template->set_var('comments_with_count',
                                      $comments_with_count);
         }
-        $story_template->set_var ('lang_full_article', $LANG08[33]);
-        $story_template->set_var ('article_url', $articleUrl);
+        $story_template->set_var('lang_full_article', $LANG08[33]);
+        $story_template->set_var('article_url', $articleUrl);
+        $printable = COM_buildUrl($_CONF['site_url'] . '/article.php?story='
+                                  . $story->getSid() . '&mode=print');
+        $story_template->set_var('printable_url', $printable);
 
         COM_setLangIdAndAttribute($story_template);
 
diff -r 619109d9b69f -r c38f594e6af1 public_html/layout/professional/article/printable.thtml
--- a/public_html/layout/professional/article/printable.thtml	Sat Mar 21 15:01:34 2009 +0100
+++ b/public_html/layout/professional/article/printable.thtml	Sat Mar 21 16:01:39 2009 +0100
@@ -4,6 +4,7 @@
   <title>{page_title}</title>
   <link rel="stylesheet" type="text/css" href="{layout_url}/print.css"{xhtml}>
   <link rel="stylesheet" type="text/css" media="print" href="{layout_url}/print.css"{xhtml}>
+  <link rel="canonical" href="{printable_url}"{xhtml}>
 </head>
 <body dir="{direction}">
     <h1>{story_title}</h1>



More information about the geeklog-cvs mailing list