Solved

Expression Web dwt and the body tag

Posted on 2009-05-11
4
1,310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses four methods for overlaying images in a container on a web page
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

696 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