PDA

View Full Version : Inserting a backgroud photo on just one page without altering template?


fishugly
01-17-2011, 12:38 AM
I have a dozen or so pages that works off a single template. However, I would like to add a background to just one page...a photo in which I can write on (watermark?). This particular page is the "home" page all the others link off from.

Is there a way to do this...without too much headache? I'm using Dreamweaver MX.

Thanks.

DWcourse
01-17-2011, 06:43 PM
Two questions:

1. Are you using CSS to set the background image for the page?

2. Does MX have the menu: Modify>Templates>Make Attribute Editable… command?

fishugly
01-17-2011, 09:31 PM
Answers:

1. Not sure I understand. I have not done anything with a background image yet. However, the template I used for the page in question does use "CSS Styles".

2. Yes.

DWcourse
01-18-2011, 01:47 PM
This article tells you how to highlight the current page in a Spry menubar on a template-based page (http://www.dwcourse.com/dreamweaver/highlighting-current-page-template.php). The part you're most interested in (not quite half way in) is about using the Make Attribute Editable command to add a class attribute to the body tag. Once you've done that you can write a CSS class rule (say .custombg) and assign it to the body tag only on the pages where you want the background to appear.

fishugly
01-18-2011, 04:28 PM
Thank you! I am sure someone could figure out how to do what I want by watching that. I'm afraid it's still over my head though.

Any other ideas...for a computer dip such as myself?

DWcourse
01-18-2011, 04:36 PM
Your best option is probably to use menu: Modify>Templates>Detach from Template for the page you want to add the background to and then add it. The page will no longer be locked but it also won't update when you change the template.

fishugly
01-19-2011, 03:05 AM
Thanks, DWcourse! That sounds easy enough.

When I "detach", will I lose all the links? In other words, will the menu still work or will I have to go in and relink everything?

Lastly, when I update the template at a later date, I just treat this page in question as a separate page and update it manually. Is that correct?

Your help is appreciated.

DWcourse
01-19-2011, 03:41 AM
When you detach a page from a template it stays exactly as it is with the exception that it is no longer linked to the template so it has to be updated separately. So make this the last thing you do when building your site.

Corrosive
01-19-2011, 06:28 AM
Any other ideas...for a computer dip such as myself?

Switch it off and go do something else? ;)

Sounds like you are torturing yourself by building a site when you aren't comfortable with computers!

I'd recommend PHP includes rather than templates but Jim's suggestion is a good one and includes might just add more confusion to the pot.

gentleone
01-19-2011, 06:58 AM
Switch it off and go do something else? ;)

Sounds like you are torturing yourself by building a site when you aren't comfortable with computers!
Looking at his 'join date' it is already a 5 year torture.