1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Rep Power

    Coldfusion master-page ?

    I am an asp.net programmer but I am using coldfusion now and my question is.. whats the best method to do a coldfusion masterpage similar to asp.net ? where all the page features are the same except the title and maincontent ...
  2. #2
  3. No Profile Picture

    Join Date
    Jun 2002
    Raleigh, NC
    Rep Power
    CF does not have a built-in analog of master page. You have a few options:

    The most basic is to use cfinclude to include common headers, footers, etc.

    The next is to create a layout file that has placeholder variables in it. You then generate your content into those variables (possibly using cfsavecontent).

    All of the popular MVC frameworks (ColdBox, Model-Glue, FW/1, etc.) include layout and templating features. So the third option (and the one I would recommend) would be to choose one of those to use.

IMN logo majestic logo threadwatch logo seochat tools logo