WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
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 Resources
Web Development Content
Internet Security Software
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
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

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 : 5069
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...









Simple PHP Templates With PatTemplate
Categories : PHP, Templates
Web Development With PHP FastTemplate
Categories : PHP, Templates, FDF
Writing Your Own Template Caching Class In PHP
Categories : PHP, Cache, Templates
Using PEAR HTML_Template_IT For Modular Interface Design
Categories : PHP, PEAR, Templates
Injecting XML Content Into Page Templates With patXMLRenderer (part 1)
Categories : PHP, XML, Templates
Sockets and PHP
Categories : PHP, Sockets
PHP and PostgreSQL
Categories : PHP, Databases, PostgreSQL
Static HTML Generation With PHP
Categories : PHP, HTML and PHP
Array Manipulation With PHP
Categories : PHP, Arrays
Date Arithmetic With MySQL
Categories : PHP, Databases, MySQL, Date Time
Executing SQL Server Stored Procedures With PHP
Categories : PHP, Databases, MS SQL Server
Time Is Money Part 1 of 2 - Designing and implementing a Web-based application
Categories : PHP, Databases, MySQL, Complete Programs
Using the .NET Assembly in PHP
Categories : PHP, .NET
PHP Debugging Tutorial
Categories : PHP, Debugging
Keep your Banner Waving
Categories : PHP, PHP Functions, Miscellaneous, Site Planning, Utilities