?
Solved

Expression Web dwt and the body tag

Posted on 2009-05-11
4
Medium Priority
?
1,313 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
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…
Suggested Courses

839 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