Forum Moderators: open

Message Too Old, No Replies

Editable "id=" in <body> - Dreamweaver Templates

Dreamweaver Templates

         

ecommerce man

2:23 pm on Mar 15, 2004 (gmt 0)

10+ Year Member



I need to edit the "id=" of the <body> tag in Dreamweaver MX templated pages.

I don't seem to be able to make an editable region inside the body tag. Any ideas?

limbo

4:15 pm on Mar 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You cannot create editable regions within a tag.

You could make that whole tag editable by placing editable regions either side

e.g.

<!--#BeginEditable "bodytag" -->
<body id="widget">
<!--#EndEditable "bodytag" -->

Then you can edit the body tag in the template-dependant files

Ta

Limbo

ecommerce man

4:45 pm on Mar 16, 2004 (gmt 0)

10+ Year Member



I've tried that - it didn't work. I get errors in Dreamweaver.

limbo

4:53 pm on Mar 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My bad - that was theoretical - of course that wouldn't work! - you need to enclose both tags to complete a region or the content of the tags will not have a place to go within the template.

Sorry I don't think you can do this short of adding editable regions to your whole body. area - but that would defeat the purpose.

What is it you are trying to do?

If it is a body formatting issue CSS would enable you to do this. and you could place different styles within editable regions or adapt one external CSS.

Ta

Limbo

ecommerce man

5:06 pm on Mar 16, 2004 (gmt 0)

10+ Year Member



I have a CSS rule that changes the nav style to highlight the page you are on. It uses the body id to select the css.

See css:

navcontainer ul {
border: 0;
margin: 0;
padding: 0;
list-style-type: none;
text-align: center;
}

#navcontainer ul li {
display: block;
float: left;
text-align: center;
padding: 0;
margin: 0;
}

#navcontainer ul li a {
background: #fff;
width: 78px;
height: 18px;
border-top: 1px solid #f5d7b4;
border-left: 1px solid #f5d7b4;
border-bottom: 1px solid #f5d7b4;
border-right: none;
padding: 0;
margin: 0 0 10px 0;
color: #f5d7b4;
text-decoration: none;
display: block;
text-align: center;
font: normal 10px/18px "Lucida Grande", "Lucida Sans Unicode", verdana, lucida, sans-serif;
}

limbo

5:24 pm on Mar 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I wouldn't use the body id to select the CSS

use a div id instead.

ecommerce man

5:28 pm on Mar 16, 2004 (gmt 0)

10+ Year Member



How would I modify the CSS to do this?

I appreciate your help!

limbo

11:27 am on Mar 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry missed your reply to this.

You assign the Div containier the id and house your info within e.g.

<div id="navcontainer">
<ul......
....</ul>
</div>

then you can leave the body tag to hold site specific data that will replicate across your site via templates.

This is how I do it but you might want to qualify it with the CSS folks [webmasterworld.com] and the CSS validator :)

sonjay

5:19 am on Mar 19, 2004 (gmt 0)

10+ Year Member



You can't make the body tag editable in Dreamweaver, but you can make individual attributes of the body tag editable.

Select the id="whatever" in the body tag, then go to Modify Menu -> Templates -> Make Attribute editable.

In the dialog box, make sure id is the selected attribute, check the checkbox to make it editable, and fill in whatever other information is needed.

Then on your child pages, choose Modify -> Template properties, and you get a box that lets you enter some other value for the id attribute.