RE: CSS link problem
RE: CSS link problem
- Subject: RE: CSS link problem
- From: <email@hidden>
- Date: Tue, 27 Apr 2004 08:53:11 +0200
- Thread-topic: CSS link problem
Jonathan's suggestion should work fine.
The problem with the original code is that the <link> and <webobjects> tags are not properly nested.
Pierre
-----Original Message-----
From: email@hidden
[mailto:email@hidden]On Behalf Of Jonathan
Rochkind
Sent: Tuesday, April 27, 2004 12:43 AM
To: Randall Perry; email@hidden
Subject: Re: CSS link problem
What did you want? That is exactly what WOResourceURL does, print
out the URL to a resource. So if that's not exactly what you wanted,
what did you want? The code as you show it seems like it should work
to me, although putting the <WEBOBJECT> tag inside attribute quotes
like that is considered bad form by some (including the WOBuilder
validator).
Another way to do this, perhaps what you want, is:
.html:
<WEBOBJECT NAME=StylesheetLink1>
.wod:
StylesheetLink1: WOGenericElement {
elementName = "LINK";
rel = "stylesheet";
type = "text/css";
name = "test"; //unneccesary
href = stylesheetHref;
}
.java:
public String stylesheetHref() {
WOResourceManager rm = application().resourceManager();
return rm.urlForResourceNamed("nameOfStylesheet.css",
"FrameworkOrNull", null, context().request());
}
--Jonathan
At 6:31 PM -0400 4/26/04, Randall Perry wrote:
>Followed someone's advice on the list of putting stylesheet in Web Server
>Resources and adding a WOResourceUrl to a WO Builder page pointing to the
>stylesheet, then referencing that in the href of the css link:
>
><link rel="stylesheet" href="<WEBOBJECT NAME=ResourceURL1></WEBOBJECT>"
>type="text/css" name="test">
>
>
>This works fine, insofar as the page displays the styles properly. But,
>where I place the WOResourceUrl it prints out the URL to the style sheet.
>Not exactly what I wanted :-P
>
>What's the deal?
>
>
>--
>Randall Perry
>sysTame
>
>Xserve Web Hosting/Co-location
>Website Development/Promotion
>Mac Consulting/Sales
>
>http://www.systame.com/
>_______________________________________________
>webobjects-dev mailing list | email@hidden
>Help/Unsubscribe/Archives:
>http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.