janetd Posted August 5, 2008 Posted August 5, 2008 How do I put category titles on the top of the individual pages? I think they should go in place of "Let's see what we have here". Am I right? Any help would be greatly appreciated!!! Thanks, Janet
FIMBLE Posted August 5, 2008 Posted August 5, 2008 Hi Janet, Found this This is a simple method of displaying Catagory name in the Page Title, instead of the standard "Let's See What We Have Here" message. Last Edited 2nd December 2005 21:14 CMT by rued Added this function for sub folders (Categories) too, e.g. if you now go to the Hardware Categorie and this contains sub categories - it wil show "Hardware Categories" as Page Title ################################## 1st Alteration: includes/classes/breadcrumb.php Original: class breadcrumb { var $_trail; function breadcrumb() { $this->reset(); } Change to: class breadcrumb { var $_trail; function last() { $trail_size = sizeof($this->_trail); return $this->_trail[$trail_size-1]['title'] ; } function breadcrumb() { $this->reset(); } ################################## 2nd (& 3rd) Alteration: Directory: includes/languages/english/index.php Around Line 19: define('HEADING_TITLE', 'Let\'s See What We Have Here'); Alter to: define('HEADING_TITLE', $breadcrumb->last()); Around Line 39: define('HEADING_TITLE', 'Categories'); Alter to: define('HEADING_TITLE', $breadcrumb->last() . ' ' . 'Categories'); Save both files and you will not get the catagory heading at the top of each catagory page instead of the standard "Let's See What We Have Here" and "Categories" Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
janetd Posted August 5, 2008 Author Posted August 5, 2008 I did this and double checked on every little thing and lost my store front. All I'm getting is a blank page. I restored and still a blank page.
burt Posted August 6, 2008 Posted August 6, 2008 Undo all the previous advice. /includes/languages/english/index.php Change this: define('HEADING_TITLE', 'Let\'s See What We Have Here'); To this: $category_name = (isset($HTTP_GET_VARS['manufacturers_id'])) ? $manufacturers['manufacturers_name'] : $categories['categories_name']; define('HEADING_TITLE', $category_name); Change this: define('HEADING_TITLE', 'Categories'); To this: define('HEADING_TITLE', $categories['categories_name']); Always try to do things the easiest way possible - when things go wrong (as they often do), the less changes you made the easier it is to fix.
FIMBLE Posted August 6, 2008 Posted August 6, 2008 Nice One :-) Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
carie Posted September 8, 2008 Posted September 8, 2008 Thank You, Thank You, Thank You!!! when you have sub categories how can you get title of product list page to show "category/subcategory" instead of just subcategory carie :rolleyes:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.