Solved

Expression Web dwt and the body tag

Posted on 2009-05-11
4
1,300 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
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…

708 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

18 Experts available now in Live!

Get 1:1 Help Now