Building a template foundation

As with all building blocks, you have to start with a good foundation upon which to build. In vldPersonals, there are several core template files found within each of your vldPersonals templates' folders. The code inside these template files begins the call to other blocks or template files and the vldPersonals loops to gather information from the database to create the final web page. Here you can find all these core templates files.

Let's look at a very simple web page structure. Most web pages feature a header, the content, and a footer. Three “blocks” that make up the whole of the page.

  • header template
  • content template
  • footer template

Inside of the header block or template file is all the information that needs to be at the top of your web page, such as the doctype, meta tags, links to style sheets, the start of the body tag, and the header information itself which typically includes the title of your site.

The content holds the profiles, articles, custom pages, the meat of your site.

The footer usually holds information like links to other pages on your site, copyright, contact information, and other details.

To add another block to our web page's structure, we could add a sidebar that includes more navigation features and information about your website.

  • header template
  • side bar template
  • content template
  • footer template

In a code view it would look like this.

<!-- INCLUDE header.tpl -->
<!-- INCLUDE sidebar.tpl -->
	CONTENT HERE
<!-- INCLUDE footer.tpl -->
 
 
 
1223 views · Last modified: 2008/01/17 14:02 by vlad