• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CSS link problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CSS link problem


  • Subject: Re: CSS link problem
  • From: Jonathan Rochkind <email@hidden>
  • Date: Mon, 26 Apr 2004 17:42:54 -0500

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.


  • Follow-Ups:
    • Re: CSS link problem
      • From: Randall Perry <email@hidden>
References: 
 >CSS link problem (From: Randall Perry <email@hidden>)

  • Prev by Date: Re: CSS link problem
  • Next by Date: [Newbie] WOHyperlinks with Id
  • Previous by thread: Re: CSS link problem
  • Next by thread: Re: CSS link problem
  • Index(es):
    • Date
    • Thread