Solved

How to use common elements without PHP includes??

Posted on 2008-09-29
6
254 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now