August 23rd, 2007phpLD Custom Category Titles
If you want to customize the titles of the categories pages and not limit it to the name of the category you can use the following modification.
Example:
Category: Internet
Custom Title: Web resources.
Category: Employment
Custom Title: Find you next job
1.
In phpMyadmin, run the following mysql query:
ALTER TABLE `PLD_CATEGORY` ADD `CUSTOM_NAME` TEXT NULL ;
2.
OPEN /templates/Code/admin/dir_categs_edit.tpl
FIND:
{if $symbolic ne 1}
<tr>
BEFORE THAT, ADD:
<tr>
<td class="label"><label for="CUSTOM_NAME">
Custom Name:</label></td>
<td class="smallDesc">
<input type="text" id="CUSTOM_NAME" name="CUSTOM_NAME"
value="{$CUSTOM_NAME|escape|trim}" class="text" />
</td>
</tr>
3.
OPEN /admin/dir_categs.php
FIND
//Determine columns
$columns = array ('TITLE' => _L('Title'), 'TITLE_URL' => _L('URL Title'),
'DESCRIPTION' => _L('Description'), 'PARENT' => _L('Parent'),
'SYMBOLIC' => _L('Type'), 'STATUS' => _L('Status'),
'HITS' => _L('Hits'), 'DATE_ADDED' => _L('Date Added'));
REPLACE BY
//Determine columns
$columns = array ('TITLE' => _L('Title'), 'TITLE_URL' => _L('URL Title'),
'CUSTOM_NAME' => _L('Custom Name'), 'DESCRIPTION' => _L('Description'),
'PARENT' => _L('Parent'), 'SYMBOLIC' => _L('Type'), 'STATUS' => _L('Status'),
'HITS' => _L('Hits'), 'DATE_ADDED' => _L('Date Added'));
4.
To add the custom category name in the page title or the body of the page, ADD {$category.CUSTOM_NAME|escape|trim}
to the appropriate template file (header.tpl, top_bar.tpl, main.tpl, …)
4 Responses to “phpLD Custom Category Titles”
Leave a Reply
You must be logged in to post a comment.


August 23rd, 2007 at 5:58 pm
don’t work with phpLD v3.0.5
pls help me to customize the titles of the categories pages on phpLD v3.0.5
August 24th, 2007 at 1:56 pm
[...] the mod here: http://blog.rakcha.com/2007/08/23/phpld-custom-category-titles/ (No Ratings Yet) Loading [...]
August 25th, 2007 at 3:13 pm
Great mod.
Just one thing… step two is in the dir_categs_edit.tpl in the ‘/templates/Core/admin’ folder; for those that cannot find the stated lines
August 31st, 2007 at 1:20 am
I installed your mod and it’s great but my home page does not get a title when I use it.
I have reverted back but how can I use your mod and still have a title on my index page?
Thanks,
Daniel