Hey,
A website I’m making right now has quite a few different page layouts (blog, home, portfolio etc are all different).
Now, should I make a new template for each file, or is there a way to use one template, but set some parts of the design in the page itself, without cluttering the editor?
I hope you understand my problem!
Kind regards
-
☆ A M B ☆
- 24,524 Posts
Look into Template Variables.
I start off with one template that is all html. Then I go back and cut out the sections that lend themselves to "blocks" of content. Navigation, header, footer, sidebar etc... Take that section of content is static, then paste it into a chunk. If it is dynamic content, replace it with a snippet or a template variable.
DropboxUploader -- Upload files to a Dropbox account.
DIG -- Dynamic Image Generator
gus -- Google URL Shortener
makeQR -- Uses google chart api to make QR codes.
MODxTweeter -- Update your twitter status on publish.
Thanks for the reactions,
What I would really like to do, is being able to set the layout per page, without using snippets in the editor,
or have different templates for every page.
Ah well, I guess that’s just impossible.
Thanks guys!
I try to keep snippets out of the editor it just confuses the clients. I was referring to your template. You can use TV’s to choose a chunk. With keeping most of the parts as chunks multiple templates are not that difficult to maintain. You might want to consider using different css links to manipulate the layout.
DropboxUploader -- Upload files to a Dropbox account.
DIG -- Dynamic Image Generator
gus -- Google URL Shortener
makeQR -- Uses google chart api to make QR codes.
MODxTweeter -- Update your twitter status on publish.
That helped!
thanks guys!
The idea of templates is that if the page is doing something else, you use a different template. To have 7 different templates for one site is not extreme, it can easily make sense. Also, this way you don’t have to explain how each different template variable would need to be set depending on which page the client is using.
"Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
-
☆ A M B ☆
- 24,524 Posts
I’ve got a tutorial on using TVs for managing content blocks here
http://www.sottwell.com/how-template-variables-work.html