Page 1 of 1
Why should modules have 'real' templates in the module directory?
Posted: Mon Feb 06, 2006 11:57 pm
by jelle
Maybe this is just due to my inexperience, but If I've understuood correctly, if you want the news module (or any module) to use a different template, you have to supply that in the module directory. Why cant I use a template that is made in the usual place (in the db). Or is that already possible?
Re: Why should modules have 'real' templates in the module directory?
Posted: Wed Feb 08, 2006 5:47 am
by kermit
i agree in respect to modules included in the core distribution. the news module, for instance, should have a templates structure similar to the new menu manager so you can have multiple templates and edit them right from the admin interface.
third party modules it should be up to the developer whether to have file-based or db-based templates.
Re: Why should modules have 'real' templates in the module directory?
Posted: Wed Feb 08, 2006 11:07 am
by Ted
Yeah, I agree about this. You can definitely tell that the News module was the first module I've done using templates. News is in dire need of an overhaul and this should probably go on the list.
Re: Why should modules have 'real' templates in the module directory?
Posted: Wed Feb 08, 2006 11:54 am
by LeisureLarry
Hmm I always thought that the edited templates of news (via the admin panel) are stored in the db (cms_module_templates). The templates of the upload module are stored there too. For other modules I don´t know.
Re: Why should modules have 'real' templates in the module directory?
Posted: Wed Feb 08, 2006 12:45 pm
by LeisureLarry
Yes, but the question of jelle was that different templates for news should be used. That could mean also that only the standard templates should be changed and this could be done by editing the templates with the admin as far you don´t need more then one template for summary and details.
I don´t know whether jelle tried to ask to use two different templates for the summary page or simply to change the standard template. For the first case the other answers are correct, for the second mine
Greats from Germany
LeisureLarry
Re: Why should modules have 'real' templates in the module directory?
Posted: Wed Feb 08, 2006 1:14 pm
by jelle
Harry, you are right, I had not found the news templates yet. So you can change the news template, but not in the place where the other templates reside, and that is a bit confusing IMHO. To the enduser templates are templates and she should not have to care about the underlying architecture to find the templates.
Maybe create a (pseudo) directory structure for the templates so that templates for news have the name news/new_stemplatename or news/alternate_templatename. that would prevent the big mess if every module dumped it's templates with the rest.
Re: Why should modules have 'real' templates in the module directory?
Posted: Wed Feb 08, 2006 1:27 pm
by LeisureLarry
Larry plz
Yes, you can change the standard templates in the admin panel. Just go to the place, where you enter the news. Between the vertical admin menu and the part where you enter the news there should be some tabs (or how they are called in english) which call summary and details or something like that. There you can change the templates of the news module and they will be stored in your database. But the news and the upload module are the only modules I know which do it that way. But I really like this way

OT:Re: Why should modules have 'real' templates in the module directory?
Posted: Wed Feb 08, 2006 2:21 pm
by jelle
Excusez-moi for getting your leisurly name wrong Larry. Did you drop the suit?
Re: Why should modules have 'real' templates in the module directory?
Posted: Wed Feb 08, 2006 2:23 pm
by LeisureLarry
Yepp dropped it
