We are going to split out the main part of our layout into a custom tag. A custom tag is handy for this, because we can call it from all the pages:
1. Let's first create a file in our
videoshare
directory namedlayout.cfm
. Copy all the contents ofindex.cfm
into this file, because so far, all we have is something we are going to repeat in our code.layout.cfm
should now look like this:<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="css/main.css" type="text/css"> <title>VideoShare</title> </head> <body> <cfoutput> <div id="header"> <h1><a href="index.cfm">VideoShare</a></h1> <div id="topnav"> <ul> <li><a href="login.cfm">Login</a></li> <li><a href="register.cfm">Register</a></li> </ul> </div>...