PDA

View Full Version : Adding [more...] on front page under subcategories


polo
05-04-2006, 02:03 AM
How can I add a link like [more...] or just [...] under subcategories on the front page?
The link will go to the content of the category...

Nick Collins
05-04-2006, 05:47 AM
Hello polo, let me know your script version and template name.

polo
05-04-2006, 11:31 AM
Pro v 1.1 and template colorburst.

Greg
05-04-2006, 02:26 PM
polo

I've seen that mod here. But don't know where it is?
Try going thru templates and modifications forums. If I happen to find it, I'll let you know.

Bryan Ex
05-04-2006, 03:43 PM
http://www.esyndicat.com/forum/viewtopic.php?t=1259

:P

Greg
05-04-2006, 03:54 PM
Thanks :)

I knew there was a reason to have you around Bryan. :D

polo
05-04-2006, 06:55 PM
Thanks for the link! :good:

I've made that mod but now I have another problem...

Before the mod I had:

Category
Subcategory 1
Subcategory 1
etc

After the mod I have:

Category
Subcategory 1, Subcategory 2, ...

I'd like to have the subcategories 1 on a line like the first time.
Also can I change someway the 3 points [...] with a link (somethink like [more]) to the entire category? :sos:

Tudor
05-05-2006, 03:25 PM
Check in... template's layout.php to change this:

foreach ($value['subcategories'] as $key2=>$value2)
{
$min = (count($value['subcategories']) < $aSubcategories) ? count($value['subcategories']) : $aSubcategories;
$divid = ($cnt2 < $min) ? ', ' : '';
$subcats .= "<a href=\"{$gDirConfig['base']}{$gDirConfig['dir']}{$value2[ 'path']}/\">{$value2['title']}</a>{$divid}";
$cnt2++;
if ($cnt2 > $aSubcategories)
{
break;
}
}

if (count($value['subcategories']) > $aSubcategories)
{
$subcats .= "...";
}
$subcats .= '</div>';

with this:

foreach ($value['subcategories'] as $key2=>$value2)
{
$min = (count($value['subcategories']) < $aSubcategories) ? count($value['subcategories']) : $aSubcategories;
$divid = ($cnt2 < $min) ? '
' : '';
$subcats .= "<a href=\"{$gDirConfig['base']}{$gDirConfig['dir']}{$value2[ 'path']}/\">{$value2['title']}</a>{$divid}";
$cnt2++;
if ($cnt2 > $aSubcategories)
{
break;
}
}

if (count($value['subcategories']) > $aSubcategories)
{
$subcats .= "...";
}
$subcats .= '</div>';

About how to make more links... I dunno! :(

Bryan Ex
05-05-2006, 03:31 PM
About how to make more links... I dunno! :(

The third line up from the bottom in the code posted above has the ...
$subcats .= "...";
Just change the ... to more in that one line.

Simon Gooffin
05-06-2006, 10:35 AM
Hi
Bryan Ex is right. All you should do is to change:
$subcats .= "...";
to
$subcats .= "more ...";