PDA

View Full Version : same content in different pages


action711
03-13-2010, 09: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.

walkamongus
03-13-2010, 11: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

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

action711
03-14-2010, 04: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

Corrosive
03-14-2010, 05: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?

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

All good now, thanks guys.

Corrosive
03-16-2010, 06:25 PM
Nice one :)

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

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