osCommerce Homepage HEADING_TITLE Display
When visiting the osCommerce site:
- default homepage,
- Parent Categories pages (i.e. Hardware, Software and DVD Movies), and
- Sub-Categories Pages (for example, CD ROM Drives, Graphics Cards, Keyboards, etc...)
osCommerce Default Homepage HEADING_TITLE
osCommerce Parent Categories HEADING_TITLE
osCommerce Sub-Categories HEADING_TITLE
Where is HEADING_TITLE?
If we checked the file or code structure osCommerce homepage (catalog/index.php). We find out that the HEADING_TITLE appear 3 times.
- Under the $category_depth == 'nested' (i.e. Under Parent Categories)
- Under the $category_depth == 'products' (i.e. Under Sub-categories)
- Under the $category_depth == 'top' (i.e. Under default osCommerce homepage)
The HEADING_TITLE find in osCommerce homepage is shown in the following picture:
Question:
There are three places sharing the HEADING_TITLE. How to change the HEADING_TITLE of default homepage, Categories pages and Sub-categories (or products) pages?
This is a question often ask in osCommerce discussion forum.
Answer:
If you read our previous osCommerce tutorials of $category_depth, you should answer the question easily. The value of HEADING_TITLE is assigned according to the value of $category_depth.
The HEADING_TITLE is defined in the homepage of language file (e.g. includes/languages/english/index.php).
Here's what we find in includes/languages/english/index.php:
As you can see that the HEADING_TITLE is defined according to the value of $category_depth.
- If $category_depth == 'nested' HEADING_TITLE is Categories
- If $category_depth == 'products' HEADING_TITLE is Let's See What We Have Here
- Under the $category_depth == 'top' HEADING_TITLE is What's New Here?
Therefore the HEADING_TITLE will shows different title when navigating osCommerce homepage, Parent Categories pages and Sub-categories (Products) pages.