Hi,
I have a product name, 'Flat Circular Knife & Core Cutter Blade'. in 'Knife category'
And i set it as content title.
If look very messy if i publish all the content in knife category as Blog.
Does anyone know how to add
in title tag?
or any others way for me to seperate the title tag into 2 lines.
Original post: http://forum.joomla.org/index.php?topic=212750.0
Html,
in content title
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
Forum rules
Re: Html,
in content title
Hi, Buddies,
I found some method to break the title into 2 lines if it's too long.
But this seems to hack the ../components/com_content/content.html.php file.
Open: ../components/com_content/content.html.php
Find: function Title( &$row, &$params, &$access ) {
Just below of it, you will see the code below:
Remove those code and replace the following:
** Save a copy of your file before any amendment.
The digit 24, is make sense tell the system those title has more than 24 length.
You can change the 30, to any digit you like. This use to tell when the title length reach char 30, the 31char on ward will put at second line.
I found some method to break the title into 2 lines if it's too long.
But this seems to hack the ../components/com_content/content.html.php file.
Open: ../components/com_content/content.html.php
Find: function Title( &$row, &$params, &$access ) {
Just below of it, you will see the code below:
title;?>
Remove those code and replace the following:
if(strlen($row->title) > 24) {
//echo '
there are '. count(explode(" ",$row->title)) . ' in this title';
$longtext = $row->title;
$shorttext = wordwrap($longtext, 30, "
", true);
$row->title = $shorttext;
echo $row->title . '';
}
else {
echo $row->title . '';
}
?>
** Save a copy of your file before any amendment.
The digit 24, is make sense tell the system those title has more than 24 length.
You can change the 30, to any digit you like. This use to tell when the title length reach char 30, the 31char on ward will put at second line.
Re: Html, <br> in content title
Another solution would be set the TD height
from:
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
to:
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%" height="60px" valign="top">
from:
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
to:
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%" height="60px" valign="top">