WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this Article to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES SUBMIT AN ARTICLE PRINT
Title : Simple Dynamic Templating for Small Sites Using PHP
Categories : PHP, Templates
devarticles
devarticles
Date : 2004-07-16
Grade : 0 of 5 (graded 0 times)
Viewed : 3861
Search : More Articles by devarticles
Action : Grade This Article
Tools : My Favotite Articles


  Submit your own code examples 
 


Let Daryl help you help your users. In this article, Daryl provides PHP code to help your users to navigate through your website and knowing exactly where they are at all times. Read more ...
One of the simplest but most important Web interface necessities is always letting the user know where he or she is within your site. This is most often done using visual cues such as highlighted navigation items, which often match the rollover states of the navigation items.

While many content management systems and application frameworks have this sort of functionality built in, these code bases are overkill for simple sites. You don't need Broadvision or Vignette or even any of the Nuke permutations for a 5-10 page brochure site.

Arguably, maintaining such a brochure site requires little enough effort that a templating system isn't even necessary, but I always find it preferable to have one set of templates to maintain. Setting your site up in this manner ensures consistency across pages, and consistency is as important for a small site as for a gargantuan portal (and maybe moreso).

Let's start with some assumptions for our first example. We're working on a 5-page Web site containing pages for home, about, contact, products, and services. All files for the purposes of this example are in the document root directory, and they all share the basic site template. In the navigation, whenever you mouse over any of the five navigation items, the rollover graphic changes colors.

What we wish to accomplish is having the appropriate navigation item for each page highlight automatically when a visitor loads the page. Since this is simplified templating, we've got a top.php, a bottom.php, and a file containing content for each of the five pages. The top and bottom templates contain all the graphical elements and tables that form the design of the site. And each of the content pages encloses its content with php tags to include top.php and bottom.php.

Read More...









Web Development With PHP FastTemplate
Categories : PHP, Templates, FDF
Using PEAR HTML_Template_IT For Modular Interface Design
Categories : PHP, PEAR, Templates
Simple PHP Templates With PatTemplate
Categories : PHP, Templates
Writing Your Own Template Caching Class In PHP
Categories : PHP, Cache, Templates
Injecting XML Content Into Page Templates With patXMLRenderer (part 1)
Categories : PHP, XML, Templates
Working with Dates and Times in PHP
Categories : PHP, Date Time
10 PHP Functions I Bet You Didn't Know About!
Categories : PHP, PHP Functions, Filesystem, Arrays, Errors and Logging
Using the .NET Assembly in PHP
Categories : PHP, .NET
Date Arithmetic With MySQL
Categories : PHP, Databases, MySQL, Date Time
Saving Images in MySQL
Categories : MySQL, PHP, Graphics, Databases
PHP References Explained
Categories : PHP References, PHP
Aspect-Oriented Programming and PHP
Categories : PHP, Aspect Oriented Programming
Beginners guide to PHP and MySQL
Categories : PHP, Beginner Guides, Databases, MySQL, Installation
Logging with PHP
Categories : PHP, Log Files
Who's Linking?
Categories : PHP, Beginner Guides, To PHP