Skip to content

Commit

Permalink
UPDATED item link
Browse files Browse the repository at this point in the history
  • Loading branch information
ajschmidt8 committed Jul 30, 2017
1 parent 140e87d commit 8c21b95
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Twig/TaxonomyListExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function twigTaxonomyList($name = false, $params = false)
'count' => null
);
}
$itemlink = $this->app['paths']['root'].$name .'/'.$slug;
$itemlink = $this->app['url_generator']->generate('taxonomylink', ['taxonomytype' => $name, 'slug' => $slug]);

$options[$slug] = array(
'slug' => $slug,
Expand Down Expand Up @@ -119,10 +119,10 @@ protected function getFullTaxonomy($name = null, $taxonomy = null, $params = nul
if (!$contenttype) {
// the normal query
$query = sprintf(
"SELECT COUNT(name) as count, slug, name
"SELECT COUNT(name) as count, slug, name
FROM %s
WHERE taxonomytype IN ('%s')
GROUP BY name, slug, sortorder
GROUP BY name, slug, sortorder
ORDER BY %s",
$tablename,
$name,
Expand All @@ -133,12 +133,12 @@ protected function getFullTaxonomy($name = null, $taxonomy = null, $params = nul
$contenttype_table = $prefix . $contenttype;
// the normal query with only published items
$query = sprintf(
"SELECT COUNT(name) as count, slug, name
"SELECT COUNT(name) as count, slug, name
FROM %s
WHERE taxonomytype = '%s'
AND contenttype = '%s'
AND content_id IN (SELECT id FROM %s WHERE status = 'published' AND id = content_id)
GROUP BY name, slug, sortorder
GROUP BY name, slug, sortorder
ORDER BY %s",
$tablename,
$name,
Expand Down Expand Up @@ -209,4 +209,4 @@ protected function getFullTaxonomy($name = null, $taxonomy = null, $params = nul

return null;
}
}
}

0 comments on commit 8c21b95

Please sign in to comment.