BUGFIX: Sometimes link doesnt work correctly

This commit is contained in:
Andrew O'Neil 2010-02-12 23:47:43 +00:00
parent 54b1c07049
commit 0bf95f21c3
1 changed files with 3 additions and 1 deletions

View File

@ -100,10 +100,12 @@ class BlogEntry extends Page {
$tags = split(" *, *", trim($this->Tags));
$output = new DataObjectSet();
$link = $this->getParent() ? $this->getParent()->Link('tag') : '';
foreach($tags as $tag) {
$output->push(new ArrayData(array(
'Tag' => $tag,
'Link' => $this->getParent()->Link('tag') . '/' . urlencode($tag),
'Link' => $link . '/' . urlencode($tag),
'URLTag' => urlencode($tag)
)));
}