-
- 163 Posts
When building a small to medium sized website, do you try and build the site out of the smallest number of templates?
What is your strategy / approach? Also, how many of you use Form Customization rules to make the backend more friendly for clients to manage?
Less is more fun, a reasonable number of templates is more practical. I have built quite complex sites using one template a la CSS Zen Garden, the body tag being given a class based on a radio button TV. But when you're spending more time fussing with the CSS than is good for you (or the client) maybe it's a good idea to have two or three templates. It also makes it easier on the client if he doesn't have to remember to choose a style in the TV. So in a sense, you can use templates as a sort of way to categorize resources.
Instead of having a template for every page that needs specific Javascript libraries or functions, I use snippets to load CSS and Javascript files as needed, using the various $modx->regClient...() API functions.
I'm still fumbling my way through Form Customization, but once I get it locked into my mind I'll use it a lot. It's especially useful in conjunction with the QuickBar snippet for providing a front-end menu bar for whatever Manager actions your users need to do.
-
- 573 Posts
I aim for less, but if you are creating lots of IF logic, than it time to create more templates .
I make great use of form customisation, the export xml feature is super handy!
[ed. note: g5604 last edited this post 11 years, 3 months ago.]
-
- 573 Posts
I sometimes constrain by template, but I have a universal policy that seems to work pretty well for every site. Simple things like changing alias to page address make a big difference to clients.
-
- 163 Posts
@g5604 - Once i'm happy with my overall permissions / form customisation, I will certainly reuse it on other projects.
I've had no problems renaming elements. Just constraining TVs linked to 1 template on a per page basis. For example: 8 pages share 1 template, but have different TV's displayed on certain pages.