View Full Version : Editing a page
02-27-2009, 08:05 PM
Hi guys I have a site which i made a while back but now i have decided to add a shop part. What i want to do is display the cart total and number of items on every page. I have the code to do this. Is there anyway in which i can add this to every current page without editing every page? Maybe include it in the CSS?
02-27-2009, 08:16 PM
If your site is just static (X)HTML (not dynamically-generated using a server-side language like Java, PHP or ASP) and you want to add content, then there's no way around it except to go back and edit the markup on every page. CSS is for presentation and layout.
However, you can save yourself that trouble in the future by using Server Side Includes (SSI) (http://www.w3schools.com/PHP/php_includes.asp) as you update the site. There have been a few threads (http://codingforums.com/showthread.php?t=159622) about this recently.
02-27-2009, 09:07 PM
okay thanks for that.
I will know for next time :)
02-27-2009, 09:38 PM
And if you prefer PHP, it's very easy and smart to use includes (http://www.tizag.com/phpT/include.php) (kinda the same as SSI, but I prefer PHP). Remember to rename your .html files to .php in order to make it work.
02-27-2009, 09:57 PM
kinda the same as SSI, but I prefer PHP
To be clear, a PHP include is a Server Side Include by definition. Did you check out the pages I linked to (http://codingforums.com/showpost.php?p=787098&postcount=2)?
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.