Commit 2896d506 authored by Doris Tam's avatar Doris Tam Committed by Robert Lyon

Bug 1832115: Navigation block shows Framework

Adding Frameworks (Smart Evidence Pages) into Collection navigation blocktype as well as the existing Views

behatnotneeded

Change-Id: Ib963658efeeb6ce0d7fb9b5b1372b13289516593
parent 9c9507bf
......@@ -43,8 +43,14 @@ class PluginBlocktypeNavigation extends MaharaCoreBlocktype {
$smarty = smarty_core();
if (!empty($configdata['collection'])) {
$views = $instance->get_data('collection', (int) $configdata['collection'])->views();
$collection = $instance->get_data('collection', (int) $configdata['collection']);
$views = $collection->get('views');
if (!empty($views)) {
if ($collection->has_framework()) {
// Add the framework link to start of list
$framework = $collection->collection_nav_framework_option();
array_unshift($views['views'], $framework);
}
$smarty->assign('views', $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