View Full Version : same content in different pages

03-13-2010, 08:22 PM
I have many pages on my site and I'd like to put the same content in a couple of divs on those pages. I'd also like to update that content over time.

I'm sure there must be a better way than copy/paste.

Can anyone help?

Thanks for reading.

03-13-2010, 10:17 PM
there is indeed an easier way... look into creating Dreamweaver templates. You'll need to learn how to make "editable" and "optional" regions. Hope this helps

03-14-2010, 07:53 AM
Or try using PHP 'includes'; http://www.dreamweaverclub.com/php-includes.php

03-14-2010, 03:59 PM
This is what I want, yes.

I followed the tutorial exactly but it didn't work.

All I get is a little php box on the dreamweaver display, and then when I preview I get nothing at all in the div.

I tried uploading the files to the server just in case php doesn't run on my mac but still nothing. Do i need to do this step? I run Leopard 10.5.6 on a mac with Dreamweaver CS4

03-14-2010, 04:27 PM
If you want to preview the design then you have to be running something like WAMP server on your machine. PHP is a server side scripting language so it has to be parsed by a server to work. I am surprised that it didn't work online. Two things to check; you have been using the .php file extension on your pages rather than .html? and your hosts do run php?

03-16-2010, 05:07 PM
Thanks Corrosive, I did neglect to change the original doc to .php.

All good now, thanks guys.

03-16-2010, 05:25 PM
Nice one :)

03-16-2010, 05:36 PM
Oh man, I've just made my site liquid!

03-16-2010, 05:41 PM
%s...rather you than me ;)