Permalink
Browse files

Avoid displaying an extra slash at the end of the breadcrumb

  • Loading branch information...
mrdoinel committed Jan 25, 2019
1 parent 20da192 commit fe67d346074a0f2386e551396010b5c72e5cce5c
Showing with 3 additions and 2 deletions.
  1. +3 −2 config/themes/default/layouts/header.inc.php
@@ -21,10 +21,11 @@
<?php } ?>
<a class="breadcrumb__root" href="<?php print Kohana::config('filebrowser.site_root'); ?>"><?php echo Subfolio::get_setting('site_domain'); ?></a>
<?php foreach (SubfolioTheme::get_breadcrumb() as $crumb) { ?>
<span class='breadcrumb__slash'>&nbsp;/&nbsp;</span>
<?php if ($crumb['url'] <> '' && $crumb['name'] <> '') { ?>
<span class='breadcrumb__slash'>&nbsp;/&nbsp;</span>
<a class="breadcrumb__folder" href="<?php echo $crumb['url'] ?>"><?php echo $crumb['name'] ?></a>
<?php } elseif($crumb['name'] <> '') { ?>
<span class='breadcrumb__slash'>&nbsp;/&nbsp;</span>
<span class="breadcrumb__current" data-trigger><em><?php echo $crumb['name'] ?></em> <i class="icon icon__dropdown_arrow"></i></span>
<?php } ?>
<?php } ?>
@@ -46,7 +47,7 @@
<script type="text/template" data-behavior="additional_content" data-breakpoint="medium-and-down,medium,small,small-and-down,xsmall">
<div class="header__dropdown" data-dropdown>
<?php foreach (array_reverse(SubfolioTheme::get_breadcrumb()) as $crumb) { ?>
<?php if ($crumb['url'] <> '') { ?>
<?php if ($crumb['url'] <> '' && $crumb['name'] <> '') { ?>
<a class="breadcrumb__folder" href="<?php echo $crumb['url'] ?>"><?php echo $crumb['name'] ?></a>
<?php } ?>
<?php } ?>

0 comments on commit fe67d34

Please sign in to comment.