[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Expression Web dwt and the body tag

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Find out what you should include to make the best professional email signature for your organization.
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…
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…

650 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