Commit d15a42a1 authored by Stacey Walker's avatar Stacey Walker Committed by Richard Mansfield
Browse files

blocktype/navigation: update to match refactoring of collection code


Signed-off-by: default avatarStacey Walker <stacey@catalyst.net.nz>
parent c1e7abc3
......@@ -50,7 +50,9 @@ class PluginBlocktypeNavigation extends SystemBlocktype {
if (!empty($configdata['collection'])) {
require_once('collection.php');
$title = collection_get_name($configdata['collection']);
$data = get_record_select('collection', 'id = ?', array($configdata['collection']));
$collection = new Collection($configdata['collection'], (array)$data);
$title = $collection->get('name');
return $title;
}
return '';
......@@ -62,7 +64,9 @@ class PluginBlocktypeNavigation extends SystemBlocktype {
if (!empty($configdata['collection'])) {
require_once('collection.php');
if ($views = collection_get_views($configdata['collection'])) {
$data = get_record_select('collection', 'id = ?', array($configdata['collection']));
$collection = new Collection($configdata['collection'], (array)$data);
if ($views = $collection->views()) {
$smarty->assign('views',$views);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment