Download presentation
Presentation is loading. Please wait.
Published byErnest Moore Modified over 9 years ago
1
Page Layout and Navigation in ColdFusion Jon Brundage CF Developer / Accessibility and Section 508 Consultant jonwind@windcompany MDCFUG April 2003
2
CF is power in your hands n This discussion shows how to use URL variables to create sophisticated layout and navigation. n You are only limited by your imagination.
3
Tags we will be using n CFINCLUDE n CFSWITCH n CFIF n CFTRY (for error handling)
4
Basic Concepts n Adding URL variables to links exposes the variables for use by site pages. n We will create and use URL variables “VIEW” and “PAGE” n example:
5
Some special files n config.cfm n nav files
6
Pages are created by components n header n left navigation (CFINCLUDE template=“leftNav.cfm”) n content area depends on URL variable (CFINCLUDE template=“#view#.cfm”) n footer
7
how it works n variables are set to default values when site is entered n as links are selected URL variables are passed for use by config.cfm, leftNav.cfm and index.cfm n pages are built based on the exposed URL variable
8
Page layout index.cfm HEADER leftNav (<cfinclude template= “leftNav.cfm”>) content area (<cfinclude template=“#view#.cfm”>) FOOTER
9
config.cfm n included at top of index.cfm n sets variables such as #title#, #describe#, #breadcrumb# n uses to set variable values depending on URL
10
leftNav.cfm n creates a navigation system n all links have URL variables added to HREF n leftNav uses to control appearance
11
other uses n add additional URL variables for subfolder content “page=travel” n use URL variable in queries
12
error handling use CFTRY to prevent URL “hacking” or misspelling of URL
13
caution using application.cfm files A reminder- using this system results in the building of index.cfm in a dynamic fashion. Your pages are processed from the root folder where index.cfm resides. Even if content is drawn from sub-folders only the application.cfm file in the root folder is processed. Any application.cfm in sub-folders ignored.
14
thanks! Have fun and be creative! MDCFUG a great asset-attend these meetings, get on the mailing list, visit their site (http://www.teratech.com/) and sign up for classes.
15
Jon Brundage Section 508 / web accessibility consulting ColdFusion development jonwind@windcompany.com 703-967-1024
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.