From 932e14971fdcfb54888ef7e4c73db0177b2e8816 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 6 Jun 2017 17:56:22 +0000 Subject: [PATCH] Issue 2864: Add a "alternate" link on display page --- mod/display.php | 7 ++++--- view/templates/display-head.tpl | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mod/display.php b/mod/display.php index ca6809eba1..bc0ba388bf 100644 --- a/mod/display.php +++ b/mod/display.php @@ -209,9 +209,6 @@ function display_content(App $a, $update = 0) { $o = ''; - $a->page['htmlhead'] .= replace_macros(get_markup_template('display-head.tpl'), array()); - - if ($update) { $nick = $_REQUEST['nick']; } else { @@ -281,6 +278,10 @@ function display_content(App $a, $update = 0) { return; } + $alternate = App::get_baseurl().'/display/'.$nick.'/'.$item_id.'.atom'; + $a->page['htmlhead'] .= replace_macros(get_markup_template('display-head.tpl'), + array('$alternate' => $alternate)); + $groups = array(); diff --git a/view/templates/display-head.tpl b/view/templates/display-head.tpl index 9a96a23988..f4d050eec2 100644 --- a/view/templates/display-head.tpl +++ b/view/templates/display-head.tpl @@ -1,4 +1,4 @@ - + -