-
AuthorPosts
-
carbonite Friend
carbonite
- Join date:
- April 2011
- Posts:
- 27
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 4
- Thanked:
- 2 times in 1 posts
July 30, 2011 at 11:40 pm #166883Is there a way to limit the amount of characters displayed by breadcrumb?
For instance, making breadcrumb end with (….) after x number of characters. This is useful because for long titles and smaller template width, breadcrumbs titles get cut of and this is not professional.
thanks!
chavan Friend
chavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
July 31, 2011 at 5:14 am #403764Go this File pluginssystemjat3base-themesdefaulthtmlmod_breadcrumbsdefault.php
Replace the following code
$name = $title;
With
$name = substr($title,0 , 20);you can change 20 in the above code with your needed count.
Note: If you Find my Post useful please click on the Thanks Icon
carbonite Friend
carbonite
- Join date:
- April 2011
- Posts:
- 27
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 4
- Thanked:
- 2 times in 1 posts
July 31, 2011 at 6:31 am #403772That code is different. Please see below
[PHP]<?php
/**
* @version $Id: default.php 18334 2010-08-05 14:03:31Z infograf768 $
* @package Joomla.Site
* @subpackage mod_breadcrumbs
* @copyright Copyright (C) 2005 – 2010 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/// no direct access
defined(‘_JEXEC’) or die;
?>
<span class=”breadcrumbs<?php echo $params->get(‘moduleclass_sfx’); ?> pathway”>
<?php if ($params->get(‘showHere’, 1))
{
echo ‘<strong>’.JText::_(‘MOD_BREADCRUMBS_HERE’).'</strong>’;
}
?>
<?php for ($i = 0; $i < $count; $i ++) :// If not the last item in the breadcrumbs add the separator
if ($i < $count -1) {
if (!empty($list[$i]->link)) {
echo ‘<a href=”‘.$list[$i]->link.'” class=”pathway”>’.$list[$i]->name.'</a>’;
} else {
echo $list[$i]->name ;
}
if($i < $count -2){
echo ‘ ‘.$separator.’ ‘;
}
} else if ($params->get(‘showLast’, 1)) { // when $i == $count -1 and ‘showLast’ is true
if($i > 0){
echo ‘ ‘.$separator.’ ‘;
}
echo $list[$i]->name;
}
endfor; ?>
</span>
[/PHP]chavan Friend
chavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
July 31, 2011 at 6:41 am #403774Ok then
Do the following in the source code you have attached
Replace this code on where ever you see in that file
echo $list[$i]->name
With
echo substr($list[$i]->name,0 , 20);
Note: If you Find my Post useful please click on the Thanks Icon
1 user says Thank You to chavan for this useful post
-
AuthorPosts
This topic contains 5 replies, has 2 voices, and was last updated by carbonite 13 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum