Let’s say I have a site that is CMS driven, in that the admin can go in and add pages as needed. Cool I can use .htaccess and make permalinks and do that kinda stuff no prob.
Now how do you do this if they want to choose from multiple layouts?
I had a site that did this before I learned about permalinks and SEO goodness, and the url had the template’s name (layout file) and a query string (content id or something). So there I got my layout needed and content requested.
If you’re using WordPress, use Custom Permalinks plugin to change the URL.
If you want to use multiple templates and choose which pages you want those on…I use HeadSpace 2…when you do that, you have to go into the settings, click advanced and add the option to change a theme on certain pages.
HeadSpace2 is mostly for SEO, but it’s a nice feature they added…which beats the heck out of having to program if(is_front_page) statements on landing pages that have different looks to them than the sub pages.
I’m more interested in learning how to do this type of thing myself. I could use WordPress, but I enjoy learning things like this.
As @andy_unleash said, I think the idea of basically flagging the template and then loading design modules is the way it’d have to be done. So you use one file as a skeleton controller that loads things based on which template is chosen. Seems like it’d be an easy enough thing to do.
And I’ve never seen HeadSpace 2. Thanks for the info!