diff --git a/site/snippets/blogexcerpt.php b/site/snippets/blogexcerpt.php index 32bbffb..43986a7 100644 --- a/site/snippets/blogexcerpt.php +++ b/site/snippets/blogexcerpt.php @@ -17,6 +17,6 @@ $a = $article;
diff --git a/site/templates/blog.php b/site/templates/blog.php index 712f65b..1646d9f 100644 --- a/site/templates/blog.php +++ b/site/templates/blog.php @@ -6,8 +6,8 @@ // license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License // ------------------------------------------- -$base_url = $site->find('blog')->url(); -function tags($base_url, $article) { +// Function needed by blogexcerpt +function tags_html($base_url, $article) { $tags = explode(',',(string)$article->tags()); if (!empty($tags[0])) { @@ -23,10 +23,12 @@ function tags($base_url, $article) { } } -$articles = $page->children()->listed()->flip(); +$base_url = $site->find('blog')->url(); +$articles = $page->children()->listed()->flip(); $title = $page->title()->html(); +// Filter by requested tag if($tag = param('tag')) { $articles = $articles->filterBy('tags', $tag, ','); $title .= ' - '.$tag; diff --git a/site/templates/blogarticle.php b/site/templates/blogarticle.php index c23cb97..ae4c48c 100644 --- a/site/templates/blogarticle.php +++ b/site/templates/blogarticle.php @@ -7,7 +7,7 @@ // ------------------------------------------- $base_url = $site->find('blog')->url(); -function tags($base_url, $article) { +function tags_html($base_url, $article) { $tags = explode(',',(string)$article->tags()); if (!empty($tags[0])) { @@ -43,7 +43,7 @@ snippet('base/cont-header');