Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other How do you structure/control a site based on a few template layouts?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #40786
    fooman
    Participant

    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.

    So let’s say the “About Us” page’s url looked as such (ugly yes, but this is what I did back in the day):
    http://www.cowpie.com/layout-1?pg=23

    Now I’d much rather have a url like this:
    http://www.cowpie.com/about-us

    How do you do this when there are 2+ layout files the admin can choose from without making ugly urls??

    #114463
    TheDoc
    Member

    Most CMSs will allow you to set a template style from the backend edit screen. This will either apply a class that you can hook into or the code will simply be spit out differently.

    #114487
    robertallen
    Participant

    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.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.