I’m new to the forums here, but have been playing with modx on and off for a few months and thought I’d ask a few questions to see how off my thinking or approaches are. My background is familiar to using the Smarty Template Engine which I like, but I need(ed) a CMS that could handle the hierarchy that modx provides.
To that end, after reading lots of forums on templates, I’m curious to know what most people do. Is it common to build a site using multiple templates? I’m used to doing something like this in smarty, but I would break my core template into a parent and then pull in what ever template pieces I need based on logic. I gather I could do something similar with PHx and some basic logic there and probably will when that time comes.
Seems to me a common practice is to keep HTML in the templates, CSS tends to be split - some people like it in a file, others in a modx object? And then use the document tree for pure content. It makes sense, by my recent site/project demanded some small alterations that were easier to just put HTML inside the document as opposed to complex logic tree’s or duplicate templates.
I’m not asking for the ’right’ way or ’best’ way, I know there isn’t one - whatever works for the author right? But I’m curious to know what other people might do.
My situtation was that I needed a 3 column standard site (using blueprint), yet for one page, the home page, I wanted a 4 column site for news, featured article, random photo and ads along with the standard menu. So I just plugged the HTML using blueprint calls into the document layer and it works great. But I will always question that decision, especially later if I feel I have to change it.
Sometimes the best method doesn’t subscribe to OO or MVC principles and I’m ok with that.
thanks all!