iSnare.com - Free Content Articles Directory
Authors Contents [Advanced Search][Add OpenSearch][Job Search]
Distribute your articles to thousands of article sites for only $2 and below! Read more...

Index  Internet
 

Using Include Files To Make Changes To All Your Website Pages Instantly

 
[ Contact the Author] [ Send to a Friend] [ Article Publisher] [Make PDF] [ Print] [ Bookmark & Share]
 
Read our Terms of Service before reprinting this article. The submitter specified above has claimed the rights to this article.
Heather Colman

Subscriber Karen Balacek poses the following question.

"I have a template with my menubar and my banner on all my pages. I change the template and save it as the same template file that I used for creating all my pages. Is there a way I can apply that to all my pages instantly or do I have to make the changes manually for each page?"

The simple answer is to use an Include File. The difficult part may be to understand how to use them. Don't be intimidated by this however. Using an Include is not really that complex when you understand the basics of how they work and why.

A lot has been written about this subject. Most is rather technical and at best difficult to understand. This article will cover the basics of how an Include File works, in easy to understand language and explain how you can apply this technique saving yourself time and effort as a result.

What is an Include?

If you are familiar with basic html you know that whatever content you put in the html coding will be displayed through an open browser. The content is placed inside html tags on the same page you want to display.

An Include File contains content that is LOCATED SOMEWHERE ELSE instead of right there inside html tags of the page.

The contents of an Include file will also be dispayed through an open browser just as if the content were right there in the html code. That "somewhere else" is usually at a different location somewhere on your server.

Using specific php type language, the html code tells your browser to go to "anotherplace.html", grab the content and display part or all of it in your browser.

Why Use an Include File?

Why would you want to use an Include File when you can accomplish the same thing in your html coding?

There are a variety of reasons for this, but this one tops my list as the most beneficial.

For the sake of simplicity, lets assume you have a 100 page website and each one of those pages displays the same page header. Lets also assume you just had a beautiful new page header designed and you want it to replace your old one.

If you were use the traditional methods of updating your pages, you would be required to make changes to the html code on 100 pages. That's a lot of work. Even minor changes to that many pages takes time to accomplish.

By using an Include, you make the changes to the Include File, upload it to your server and it automatically updates those 100 pages for you.

The content inside an Include can be anything you can put on a webpage ie.. text, graphics, audio etc.

The format can be any format you use on your web page, ie...txt, .html, .asp, .php etc.

A small piece of php code (NOTE: Replace brackets [ ] with < > below)

[?php include('http://www.yourwebsite.com/yourpageheader.html'); ?]

replaces the standard code for your page header in your html code.

[img src="http://yourwebsite.com/yourpageheader.jpg"]

Now when you update your pages you can make changes to ONE file to update hundreds. The beauty of this is there are no limits to the number of Includes you can use on one page.

The Include File originated with the php language, but your pages do NOT need to be in php to use them.

To use an Include File in your html or htm pages you need to add a small .htaccess file to your server. If you do not already have .htaccess file on your server, you can make one in Notepad or any text editor. Starting with a blank page, copy and paste the following code.

#RemoveHandler .html .htm
#AddType application/x-httpd-php .php .htm .html
AddHandler application/x-httpd-php .html .htm

Save the file as .htaccess and upload it to the same folder that contains your index file. If you already have one, update it to include this information.

Important NoticeDISCLAIMER: All information, content, and data in this article are sole opinions and/or findings of the individual user or organization that registered and submitted this article at Isnare.com without any fee. The article is strictly for educational or entertainment purposes only and should not be used in any way, implemented or applied without consultation from a professional. We at Isnare.com do not, in anyway, contribute or include our own findings, facts and opinions in any articles presented in this site. Publishing this article does not constitute Isnare.com's support or sponsorship for this article. Isnare.com is an article publishing service. Please read our Terms of Service for more information.

Copyright 2008 Heather Colman. Graphic Designer Heather Colman helps virtual assistants, coaches, and other professionals online bring visualization and depth to their products with custom 3d product images and website graphics. Visit her site at: CustomDesignGraphics.com

Article Tags: file [See Dictionary], html [See Dictionary], pages [See Dictionary]
Got a question about this article? Ask the community!
Article published on March 29, 2008 at Isnare.com
 
Rate [Ratings: 5 / 5] [Votes: 1]

My Ebook Cover Looks Like It's Had Too Much To Drink!
Submitted by: Heather Colman

We've all seen them Those ugly little covers that look out of wack...

Make Extra Money Online
Submitted by: Blanca Ciotoiu

If you are expecting that I'm going to tell you a fast way to make extra money online then, you are wrong...

Web Site Design and Development – Tell a Story to Build Your Credibility and Educate Customers
Submitted by: Daljeet Sidhu

The best way to attract customers to your business is to make them understand what sets you apart from the competition...

Traffic Builder For Free
Submitted by: Dansar Gin

After you decide to have a website and to buy a domain name for your website you will ask a lot of questions like: - What is the right way to start...

5 Ways Verizon FiOS Can Help You Make Money From Home
Submitted by: Russell Blanc

5 Ways Verizon FiOS can Help You Make Money From Home If you are one of the Verizon FiOS New York customers that is looking for a way to make some extra income or to replace a lost job, Verizon FiOS super fast Internet and high quality TV service can help...

What is All About Ebooks?
Submitted by: Roberto Sedycias

Ebook stands for electronic book These are usually in a word processor format or PDF file that can be emailed and delivered anywhere by virtual means...

How Broadband Internet Connections Work
Submitted by: Andy Fullard

We all know that due to inflation and the rising prices of the commodities we can save very little for us...

What Are Meta Tags and Why Are They Important?
Submitted by: Blake Evans

A “meta tag” is a common phrase that new web designers generally have to deal with as soon as they sit down to create a website...

Podcasting
Submitted by: John Taylor

A podcast is a succession of digital media files, audio or video, that are discharged digressively and downloaded through web syndication...

Bang For Buck – How to Best Apply Twitter to Your Business and Earn Money Online
Submitted by: Trond Lyngbø

The digital world is growing and changing at an explosive rate As always, change brings both business opportunities and threats...

The Role of Backlinks in the Success of a Website
Submitted by: Kanaga Siva

The goal of most webmasters today is to obtain as many backlinks as possible for their websites by virtue of the fact that these links bestow enormous benefits on their websites...

SEO – Do You Know The Top 7 Traits Of Legitimate Search Engine Optimization Companies
Submitted by: Daljeet Sidhu

Did you know that nine out of ten people access online information through a search engine (SE) And eight out ten do not go past the first page of the search results...

How to Optimize Your Website Keywords - SEO
Submitted by: Sebastian Warnke

What does it take to be in the top 10 search engine results on Google or Yahoo The answer is finding the right keywords and optimizing your site accordingly...

Who Needs a Website Builder?
Submitted by: Jason Kay

If you are planning your first website you have no doubt heard of a website builder, but perhaps you are not sure of what it is or if you need one...

Basics Of Search Engine Optimisation (SEO)
Submitted by: Lijo George

What is SEO Search Engine Optimization is a step by step process in which a web site is optimized to the expectations of Search Engines...

48 Tips on How to Earn Money Online Fast
Submitted by: Robert E. Jacobcs

Earning extra cash is the buzzword on everybody’s lips anywhere you go People, young and old, rich and poor alike all talk about making extra money because of the economic crisis that is still hanging above everyone’s heads like a gloomy cloud up to this day...

Isnare.com Footer Divider

© 2004-2009. Isnare Free Articles - An Isnare Online Technologies Free Articles Project. All Rights Reserved.   Privacy Policy