Page 1 of 1

Template, menu, tpl-files

Posted: Sun Jan 03, 2010 7:39 pm
by docman
Hi, I am having a bit of difficulty in keeping track of what is what, in terms of their relations.

1. In the pahe list I see templates being associated with pages. What are the .tpl files where these templates are stored? Where can this info obtained as needed in some smarty code filtering for the menu when using FEU, i.e.?

2. Where can the association of templates and menus be found?

Thanks in advance.

Re: Template, menu, tpl-files

Posted: Sun Jan 03, 2010 7:43 pm
by RonnyK
.tpl files are inside the modules-folder and they are coming with the install. With newer versions they can be overwritten as they might have been improved. When you want to modify a template to suit your needs, you can import them and give it a name, than modify it. DONT MODIFY THE .TPL ITSELF.... in the template attached to your pages, you should then modify the {menu} call to call the new template. Keep in mind that the .tpl should NOT be put then, as it is a db-template now (NOT overwritten in upgrade....)

The stylesheets that are attached to a template can be seen, by pressing the CSS-button on the right side, in Layout-Templates, or when in the template-editing (also the CSS-button).

Ronny

Re: Template, menu, tpl-files

Posted: Sun Jan 03, 2010 7:57 pm
by docman
Thanks you. Is this command correct then?

Code: Select all

{menu template="cssmenu.tpl"}
Again, I canno find any explicit association of the template as listed being assigned to a page and its .tpl file. In a command, like shown above, still the .tpl file is need to be identified.

I hope I am not too vague.

Thanks.

Re: Template, menu, tpl-files

Posted: Sun Jan 03, 2010 8:19 pm
by RonnyK
A pagetemplate is db-driven in cmsms, the call you show is correct, that callsĀ  the menutemplate cssmenu.tpl, which is the file-one...

When you edit a page, the options-tab shows the template attached....When you want that box on the main-page, just select it in global-settings, advanced tab 'basic properties' then the template will be showing on the main tab. Without specifying a specific template, the default template is taken.

Ronny

Re: Template, menu, tpl-files

Posted: Sun Jan 03, 2010 8:51 pm
by docman
Thanks you. It was very helpful.