What does STS 4's Index module do?

The naming of this module can be a bit confusing. When you think of index page, you normally think of the home/front page of your site. Which is partially what this module applies to but it does much more than that.

With the Index module, you can create a different layout/look for your home page (e.g. when you want it to look pretty different from the rest of your site), your category and/or sub-category pages, and/or your manufacturer pages. These customized layout might range from different colours, positional arrangement of pieces of information, and/or additional informational text that you want displayed only for certain category, sub-category, or manufacturer pages.

If you use this, the layout you apply to a category will also automatically be applied to all its sub-category(ies) and product items within that unless you have specific layouts specified for the sub-category or product detail pages.

For instance, if you use this module and create a customized template for the design & look of a specific category, and this category has one sub-category, and 10 products within that sub-category, then the template look that you applied for that category will also be automatically applied to its sub-category and all 10 product detail pages. And this is true whether you drill-down to find one of those 10 product items, or you use a search to find it, or by entering the URL to the category/sub-category/product in the address bar.

The above is true unless you have a another templated design that is more specific - e.g. you have also customized the sub-category or you have a customized template for the product (which is done via the Product Info module). The more specific templates will always take precedence over the more general templates. That is, the most specific templates would be those specially designed for a specific product; next would be a specific product within a specific category; then a (sub-)sub-category template; then a category template; and the most general would be the sts_template.html which is the Default template (from Default module). This Default template would apply for the entire site if you have STS enabled and use no other modules except the Default module.

This same kind of logic holds true whether we are talking about "categories" or "manufacturers" in your osCommerce.

So we now know that the Index module, when it looks for what templates to apply to which pages, also takes into consideration the product pages templating (i.e. has a product page been design-customized via the Product Info module?). The following flowchart shows how this logic works:

STS 4 - Index module flowchart
If you are not going to customize your category or manufacturer or your home page, don't enable the Index module as the Default module will be sufficient and will save you processing time.

Settings: STS Index Module

STS 4 - Index module settings
  • Use template files for index page - Will you be customising the look of your Home page, (sub)Category, and/or Manufacturer pages?
    Set to "true" to enable
  • Files for index.php template - What placeholder files will you be using for any of your design-templates here?
    By default, the sts_user_code.php placeholder file is included. If you don't need it, you can remove from this field. If you are using more/other placeholder files, add it here. Separate each placeholder file with a semi-colon.
    Reminder: all placeholder files must be in /includes/modules/sts_inc/
  • Check parent templates - Do you want Index module to keep looking upwards for a category's parent if there is no specific "index"-template for that specific category?
    If "true", and a specific sub-category has no "index"-template, then the Index module will check to see if it's parent (sub-)category has a specified template, and if not, if the category-parent (another level) above has a specified template, etc. If you don't want/need this, set to "false" - which will save you parsing and processing time.

Naming Formats for "Index" templates

Just to be my old repetitious self, let me repeat again that the word "index" as used here to refer to HTML design templates do NOT refer to the Home/Front page. (It can however, as you will see in a moment.)

Rather, it is as if the term "index" as used here in this Index module means the "front" page for each sub-category, category, and/or manufacturer. Which is still a bit misleading because, for example, a category's "index" template will still apply to all its child-categories and product pages (unless specifically over-ridden). Oh well, just remember that the work "index" here does not just mean your home/front page!

If you are going to customize any of these pages, then the naming format are as follows, and each of these (HTML) template-files must be stored in /includes/sts_templates/test/ (where "test" folder is your Working Template folder. Please refer again to STS 4: Default Module if unclear as to what a "Working Template" is.)

for .. File Naming Format
(site's) Home page index.php_0.html
a specific manufacturer (e.g. manufacturers_id=6) index.php_mfr_6.html
all manufacturers index.php_mfr.html
a sub-category..
(e.g. cPath=40) which is a child of parent category (e.g. cPath=2)
index.php_2_40.html
(Note: top-parent category-id first, then it's child-cat-id, then next child-cat below that, &c.)
category (no parent) e.g. cPath=3 index.php_3.html

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

 

Healthful Soulful Things

Custom Search