Handling Repetitive Content
Very frequently you will find yourself inserting the same content into web pages the most common case being the page navigation. The problem arises when it changes. For example imagine we have the following simple navigation on 20 pages of our site. Home|Contact Now what happens if we want to change it to Home|Contact|articles Well we will normally need to hand edit all twenty pages. There are however ways to overcome this. Method 1Use an editor like FrontPage that support find and replace across multiple pages. This however only tends to work if the change affects a single line. If it spans multiple lines then it doesn't work. Method 2Use a web editor that supports content includes. FrontPage supports this using a webbot. See Using FrontPage webbot for Page Includes. Dreamweaver supports the same using Library items. Method 3-Use JavaScriptAlthough Javascript is often used for adding content from other sites (like Google adwords) it is not so popular anymore for menus. The reason is that search engines don't normally follow JavaScript links. Therefore I won't consider this further . However you can find more about the different links in Website Navigation . Method 4- Use Sever Side Scripting Like PHP or ASPThis method is very power but requires that your website host supports the scripting language (most do). You can find out more in the Using PHP to add repetitive content. Method 5 -Server Side Includes (SSI)Server Side Includes (SSI) are sometimes classed as server side scripts, but they are really a collection of specially embedded commands. They are not as powerful as scripting options like PHP and require server support. You can find out more in Server Side Includes. Method 6-Use ImagesThis is a very powerful and simple technique. You just convert your text into an image object and insert it in the page.
Resources: |
||
|