Why should modules have 'real' templates in the module directory?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
jelle

Why should modules have 'real' templates in the module directory?

Post 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?
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Why should modules have 'real' templates in the module directory?

Post 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.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Why should modules have 'real' templates in the module directory?

Post 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.
LeisureLarry

Re: Why should modules have 'real' templates in the module directory?

Post 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.
LeisureLarry

Re: Why should modules have 'real' templates in the module directory?

Post 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 :D

Greats from Germany
LeisureLarry
jelle

Re: Why should modules have 'real' templates in the module directory?

Post 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.
LeisureLarry

Re: Why should modules have 'real' templates in the module directory?

Post by LeisureLarry »

Larry plz :D

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 :D
jelle

OT:Re: Why should modules have 'real' templates in the module directory?

Post by jelle »

Excusez-moi for getting your leisurly name wrong Larry. Did you drop the suit?
LeisureLarry

Re: Why should modules have 'real' templates in the module directory?

Post by LeisureLarry »

Yepp dropped it ;D
Locked

Return to “CMSMS Core”