Re: header, footer, body tags in conditionals and seperate components
Re: header, footer, body tags in conditionals and seperate components
- Subject: Re: header, footer, body tags in conditionals and seperate components
- From: Chuck Hill <email@hidden>
- Date: Mon, 30 Mar 2009 16:27:28 -0700
On Mar 30, 2009, at 4:24 PM, David LeBer wrote:
On 30-Mar-09, at 6:53 PM, Johan Henselmans wrote:
I used to have a <body> and </body> tags wrapped in their own
header and footer components with some conditionals to add a
bgcolor : yellow would be a test site and white the real site.
Tthat does not work in 5.4.x anymore: 5.4.x expects a complete tag
in a component: <body> should be ended with </body> in one
component, otherwise it throws an exception. I can not have one
component with the <body> tag, and another component with the </
body> tag.
What alternatives would you recommend to do what I want to do?
(make a difference between a test site and the real site by body
back ground color).
You want to create a wrapper component
ie: My WrapperComponent
<wo:WOGenericContainer elementName="body" class="$deployType">
<wo:WOComponentContent/>
</wo:WOGenericContainer>
Usage:
<wo:MyWrapperComponent>
// Content goes here
</wo:MyWrapperComponnet>
Or conditionally include a CSS file.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden