template chunks anyone?

Talk about new features for CMSMS and modules.
Post Reply
scorche
New Member
New Member
Posts: 4
Joined: Sat Nov 28, 2009 12:37 am

template chunks anyone?

Post by scorche »

I'm using a lot of global content inside the modules to help with the "modularity" for the development process.

For example, I'f I'm using rounded corners there's a bunch of divs to go through, and it can get really messy to have all of that in a template, especially while you're still working out the details or have a few different templates that rouse a lot of the code.


So... it would be nice to have these template chunks, and be able to import/export with the main template.
Also there could be an option to cache the templates/template chunks with all the the chunks when the template or the chunk is updated so there's not so many calls during page render.


anyway I think I'm on to something here, but would like to hear either some support on this or your thoughts on this.
I realize this is not critical. I can keep using the global content block, but that can't be the best way to do this.

anyhow, I'm used to modx, and working certain way with a cms, but I think modx is a bit of an overkill for some projects, so simplicity in a cms (especially from the client/editor side) is welcome.
replytomk3

Re: template chunks anyone?

Post by replytomk3 »

Put it in a properly named separate template. You can have as many templates as you want. You can also have one template overriding another. Am I missing something?
scorche
New Member
New Member
Posts: 4
Joined: Sat Nov 28, 2009 12:37 am

Re: template chunks anyone?

Post by scorche »

I guess it's me missing something
how do I call another template from inside a template ?
I tried
{template name='___'}

but that didn't work...
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: template chunks anyone?

Post by Dee »

Try Smarty's include function:

Code: Select all

{include file='___'}
Regards,
D
Post Reply

Return to “Feature ideas”