What is the respective 'overrides' for 'top.tpl' + 'main.tpl' + 'bottom.tpl'

Hi All,



Can anyone give me a clear set definition of what the document 'hooks' are called for top.tpl, main.tpl and bottom.tpl?



I recently created a 'main_content.override.tpl' to replace the existing templates however this seems to interact with 'main.tpl', specifically removing

The index:main_content hook replaces top.tpl if used as an 'override' (I.e. filename main_content.override.tpl).

There is no hook for main.tpl

There is also no hook for bottom.tpl, but there is hooks of index:bottom_links and index:bottom.

[quote name='tbirnseth' timestamp='1312242106' post='118651']

The index:main_content hook replaces top.tpl if used as an 'override' (I.e. filename main_content.override.tpl).

There is no hook for main.tpl

There is also no hook for bottom.tpl, but there is hooks of index:bottom_links and index:bottom.

[/quote]



Thanks for the clarification Tony,

I guess I'll stay away from hooks for a little while longer then.



I was hoping that CS-Cart could provide file hooks or all files so that modification to the root didn't mean having to shift though thousands of file changes in future.

Hooks aren't really file based as much as functionality based. I.e. no sense in having a whole new/different product_data.tpl when all you need to do is change the prices area.



But what I do when I find a need that doesn't exist is to simply make a comment that I created the hook and then just create it.

For instance, to completely replace main.tpl, in index.tpl I'd change the

{include file=“main.tpl”}

to be

{**EZms added index:main hook **}

{hook name=“index:main”}{include file=“main.tpl”}{/hook}

{**EZms end added hook index:main **}



Then when it comes upgrade time, it's pretty easy to see from the diffs what I changed. I also create a text file (ez_standard_file_changes.txt) with notes about any standard files I've changed (hooks are kind of self documenting).