Solved

How to use common elements without PHP includes??

Posted on 2008-09-29
6
257 Views
Last Modified: 2013-11-19
hi all,

I'm guessing this is an easy one, I hope so:

I've done many sites over the years, using Dreamweaver as my main program. Done them in HTML, and many with PHP.

Recently, I've really liked using PHP includes for my navigation bars, headers and footer. I like this rather than using Templates within Dreamweaver.

I now have a client, that for SEO reasons, will not let my use PHP, they strictly want HTML, XHTML or CSS.

Within that, how can I use common elements like a footer or header throughout, without having it actually coded onto each page?

Thanks, Cory

0
Comment
Question by:stonerome
6 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 350 total points
ID: 22599410
in html, the INCLUDE syntax is called, surprisingly: include
http://www.boutell.com/newfaq/creating/include.html
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 150 total points
ID: 22599411
Hi Cory,

You can use regular server side includes if the host is set up correctly:

<!--#include virtual="/includes/header.html" -->

What might be easier for you is to use Dreamweaver to handle includes via Library Items.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 22599417
*shakes tiny fist at AngelIII*

Beat me by seconds!
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 5

Expert Comment

by:crush83
ID: 22599643
I'm not sure how much PHP includes would really affect SEO now days, though I guess it doesn't matter if it's not what the client wants.
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22600223
PHP gets SEO optimized just FINE by all the major SEngines -- if not 60% of google pages would disappear!

However, people harbor long standing preconceptions, even if they are now outdated.  AS long as you don't make links in javascript, and you do page renames from queries in the HTACCESS, PHP is indexed fine.
0
 

Author Closing Comment

by:stonerome
ID: 31501308
thanks all...knew it was probably easy!
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Divi Them Help with Full Width header 20 67
Input box gone wrong 8 24
Location of Buttons 4 15
Pure CSS popout image menu - want the most beautiful style. 7 29
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question