Re: Referencing page components?
Re: Referencing page components?
- Subject: Re: Referencing page components?
- From: Jean-François Veillette <email@hidden>
- Date: Thu, 02 Jun 2005 13:45:05 -0400
The 'simplest' solution would be to make 'hard-linked' url with
relative path to installation url.
So for a css stored in you app wrapper, that would be :
<link
href="/WebObjects/FooBar.woa/Contents/WebServerResources/styles.css" >
and if the file is stored in a framework :
<link
href="/WebObjects/Frameworks/BarFoo.framework/WebServerResources/
styles.css" >
in there you can use this syntax to access ressources :
url(/WebObjects/FooBar.woa/Contents/WebServerResources/myLogo.jpg)
The idea is to make references to the installed location of your files.
Second option, it situation where it's needed :
build a component responsible for the css content. So you would have a
component, that use wostring, wo images, and woresourceurl to build
it's content, but that content would not be .html it would be .css.
For convenience :
- you can make it availlable from a direct-action call
- it most likely doesn't need any state, so it can be stateless
- jfv
Le 05-06-02, à 13:15, Mark Woollard a écrit :
I have a css styles.css, which in turn references some images for
backgrounds etc. The html template of my wo uses the css. The css and
images are packaged in the woa structure. I'm not clear on how I
reference them from the html template, <link href="styles.css"...>
does't appear to work. I could serve the items from the webserver
directly and put hrefs in the template that include a full url, but
that seems to defeat the point of it being an object:-) Assuming the
html reference is corrected to locate the css I assume the image
references in the css will need changing too. Is this clear now?
Thanks
Mark
On 2 Jun 2005, at 17:59, Chuck Hill wrote:
Can you give us a bit more information on what "static images and css
that are wrapped up as part of the object" means? I'm not clear on
what you are trying to do. WOString and the data binding on WOImage
might be what you want...
Chuck
On Jun 2, 2005, at 1:23 AM, Mark Woollard wrote:
In my webobject I want to reference static images and css that are
wrapped up as part of the object. How do I reference these from my
Main.html?
Thanks
Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development 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:
email@hidden
This email sent to email@hidden
_______________________________________________
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