Solved

Expression Web dwt and the body tag

Posted on 2009-05-11
4
1,303 Views
Last Modified: 2013-11-09
Hi Experts

I use Microsoft Expression Web and always use Dynamic Web Templates.  I have a problem I can't figure out.  I need an ID on the body tag of each page for the menu CSS to reference.  Something like this....  <body id="contact">

So I need to edit each page to change the ID.  So I thought I'd make that body tag as an editable region in the DWT.  Something like this...

<!-- #BeginEditable "bodyid" -->            
<body id="contact">
<!-- #EndEditable -->

My problem is it appears Expression will not allow a Editable region around the body.  It does update pages but overwrites content on the pages with content from the template.  Esentially it's ignoring the editable region.

See my problem?

Have a look at this screen shot.  Only 1 editable region when there should be 2.

Any thought?

example.png
0
Comment
Question by:willnjen
  • 2
  • 2
4 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24460319
Hi willnjen,

You can't surround the body tag as an editable region.

>> So I need to edit each page to change the ID.

You should be making the required change in the DWT and it will then update the child pages.  If the id has to be different on each page, then you need to make just the id attribute editable.
<!-- TemplateParam name="id" type="text" value="somthing" -->

</head>
 

<body id="@@(id)@@">

Open in new window

0
 

Author Comment

by:willnjen
ID: 24460374
Hi Jason

I see what you are saying about getting the Body ID to reference a value in the head.  I just can't get the syntax correct to make it work.  Have a look at my code below.  The value "home" does seem to be assigning to the body id.  

Is it laid out correctly?

Cheers

Will
<!-- #BeginEditable "bodyid" -->

TemplateParam name="id" type="text" value="home"

<!-- #EndEditable -->

</head>
 

<body id="@@(id)@@">

Open in new window

0
 

Accepted Solution

by:
willnjen earned 0 total points
ID: 24460407
I've fiigured out how to do this.  I am now assigning the ID to a table rather than the body.  

Something like this...http://www.rxs-enterprises.org/tests/navigation/currentPage.aspx

Jason, you put me on the right track by getting me to think laterally.  Thanks
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24460522
Your sample code was incorrect, but apparently it doesn't matter now.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now