Last active
December 16, 2016 06:55
-
-
Save HaeckDesign/2b14dfacfddf3e58e35a to your computer and use it in GitHub Desktop.
Revisions
-
HaeckDesign renamed this gist
Jul 31, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
HaeckDesign revised this gist
Jul 31, 2015 . No changes.There are no files selected for viewing
-
HaeckDesign created this gist
Jul 31, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,66 @@ <?php defined('_JEXEC') or die; ?> <ol itemscope itemtype="http://schema.org/BreadcrumbList" class="uk-breadcrumb uk-margin uk-link-muted <?php echo $moduleclass_sfx; ?>"> <?php if ($params->get('showHere', 1)) { echo '<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem" class="uk-active">' . JText::_('MOD_BREADCRUMBS_HERE') . '</li>'; } else { echo '<li><i class="uk-icon-home"></i></li>'; } // Get rid of duplicated entries on trail including home page when using multilanguage for ($i = 0; $i < $count; $i++) { if ($i == 1 && !empty($list[$i]->link) && !empty($list[$i - 1]->link) && $list[$i]->link == $list[$i - 1]->link) { unset($list[$i]); } } // Find last and penultimate items in breadcrumbs list end($list); $last_item_key = key($list); prev($list); $penult_item_key = key($list); // Make a link if not the last item in the breadcrumbs $show_last = $params->get('showLast', 1); // Generate the trail foreach ($list as $key => $item) : if ($key != $last_item_key) { // Render all but last item - along with separator echo '<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">'; if (!empty($item->link)) { echo '<a href="' . $item->link . '" title="' . $item->name . '" itemprop="item"><span itemprop="name">' . $item->name . '</span></a>'; } else { echo '<span itemprop="name">' . $item->name . '</span>'; } if (($key != $penult_item_key) || $show_last) { echo ''; } echo '</li>'; } elseif ($show_last) { // Render last item if reqd. echo '<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem" class="uk-active" ><span itemprop="name">'; echo $item->name; echo '<link itemprop="url" href="' . $item->link . '"/></span></li>'; } endforeach; ?> </ol>