PDA

View Full Version : Different front ends with Same backend?



rakoom2002
13 Jul 2010, 10:52 PM
I will try to explain this as best as I can, and if I'm using incorrect terms, please fill me in.

I have a friend who has a website http://www.bodykitdirect.com/ that sells body kits for cars. He wants to now sell spoilers, hoods, etc and was wondering if he can have one backend with multiple front ends. So he wants the same layout for like php, the drop down menus to select the cars, but now different pages for each category. Basically a replica of the main webpage.

Wickham
14 Jul 2010, 02:17 AM
Most people use PHP "include" files.

You have separate pages for different content, like body kits, spoilers, hoods (use one page as a template and edit the content for the others, saving with a .php extension instead of .html).

In every page you have PHP code to include the bits that repeat on every page, like a header, logo, menu bar, footer with code like <?php include ("header.inc"); ?> in the places where the html markup would normally go

You create separate "include" files for each of the common bits, just the html markup without doctype, html, head or body tags.

See http://www.wickham43.net/serversideincludes.shtml