Commit 86dcbd57 authored by Nigel McNie's avatar Nigel McNie
Browse files

Add placeholder items in the middle of the breadcrumbs for blogs and views.

parent 05fdefbb
......@@ -43,7 +43,10 @@ class HtmlExportBlog extends HtmlExportArtefactPlugin {
}
$smarty = $this->exporter->get_smarty('../../../');
$smarty->assign('breadcrumbs', array(array('text' => $blog->get('title'), 'path' => 'index.html')));
$smarty->assign('breadcrumbs', array(
array('text' => get_string('blogs', 'artefact.blog')),
array('text' => $blog->get('title'), 'path' => 'index.html'),
));
$rendered = $blog->render_self(array());
$smarty->assign('rendered_blog', $rendered['html']);
$content = $smarty->fetch('export:html/blog:index.tpl');
......
......@@ -167,6 +167,10 @@ class PluginExportHtml extends PluginExport {
$smarty = $this->get_smarty('../../');
foreach ($viewids as $viewid) {
$view = new View($viewid);
$smarty->assign('breadcrumbs', array(
array('text' => get_string('Views', 'view')),
array('text' => $view->get('title'), 'path' => 'index.html'),
));
$directory = $this->exportdir . '/' . $this->rootdir . '/views/' . preg_replace('#[^a-zA-Z0-9_-]+#', '-', $view->get('title'));
if (!check_dir_exists($directory)) {
......
......@@ -14,7 +14,7 @@
<ul>
<li><a href="{$rootpath}index.html">Home</a></li>
{foreach from=$breadcrumbs item=crumb}
<li>&raquo; <a href="{$crumb.path|escape}">{$crumb.text|escape}</a></li>
<li>&raquo; {if $crumb.path}<a href="{$crumb.path|escape}">{$crumb.text|escape}</a>{else}{$crumb.text|escape}{/if}</li>
{/foreach}
</ul>
</div>
......
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