[geeklog-cvs] geeklog: Added canonical link to the static pages 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/4becf2221952
changeset: 6845:4becf2221952
user: Dirk Haun <dirk at haun-online.de>
date: Sat Mar 21 16:10:04 2009 +0100
description:
Added canonical link to the static pages printable.thtml
diffstat:
2 files changed, 4 insertions(+)
plugins/staticpages/functions.inc | 3 +++
plugins/staticpages/templates/printable.thtml | 1 +
diffs (24 lines):
diff -r c38f594e6af1 -r 4becf2221952 plugins/staticpages/functions.inc
--- a/plugins/staticpages/functions.inc Sat Mar 21 16:01:39 2009 +0100
+++ b/plugins/staticpages/functions.inc Sat Mar 21 16:10:04 2009 +0100
@@ -431,6 +431,9 @@
$print->set_var('sp_content',
SP_render_content(stripslashes($A['sp_content']), $A['sp_php']));
$print->set_var('sp_hits', COM_numberFormat($A['sp_hits']));
+ $printable = COM_buildURL($_CONF['site_url']
+ . '/staticpages/index.php?page=' . $page . '&mode=print');
+ $print->set_var('printable_url', $printable);
if ($A['commentcode'] >= 0) {
$commentsUrl = $sp_url . '#comments';
$comments = DB_count($_TABLES['comments'],
diff -r c38f594e6af1 -r 4becf2221952 plugins/staticpages/templates/printable.thtml
--- a/plugins/staticpages/templates/printable.thtml Sat Mar 21 16:01:39 2009 +0100
+++ b/plugins/staticpages/templates/printable.thtml Sat Mar 21 16:10:04 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>{sp_title}</h1>
More information about the geeklog-cvs
mailing list