Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > PHP/MySQL/Scripting

This chapter is from the book

Making It all Work

The last step in creating something to show Sonic was to create the index.cfm file, which would control the entire application, but most of the work had already been done. The custom tags and components and include files were set up to do the hard work. The index.cfm simply needed to output it to the browser.

<!---
/// SECTION 1 - HEADER
  --->
<CFINCLUDE
    TEMPLATE="/WEBINF/
portal/style/includes/#SESSION.UserPrefs.Header#">
<!---
/// SECTION 2 - NAVIGATION TABS
  --->
<CFINCLUDE
    TEMPLATE="/WEB-INF/portal/lib/tab.cfm">
<!---
/// SECTION 3 - PORTLET DISPLAY (OR ADMIN, IF APPLICABLE)
  --->
<CFINCLUDE
    TEMPLATE="/WEB-INF/portal/lib/portletdraw.cfm">
<!---
/// SECTION 4 - FOOTER
  --->
<CFINCLUDE
    TEMPLATE="/WEBINF/
portal/style/includes/#SESSION.UserPrefs.Footer#">

If you really boiled it down , thought Jim, the template was only four lines of code. At the top and bottom, the header and footer were included; those would lay out the design. The tab.cfm template is included for high-level navigation, and the portletdraw.cfm template lays out the portlets.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.