[Plone-UI] Trouble with custom css (browser resource)
rcecil
rob.cecil at gmail.com
Mon Jun 1 05:46:55 UTC 2009
Other info:
* Plone 3.2.1
* CMF 2.1.2
* Zope (Zope 2.10.6-final, python 2.4.6, darwin)
* Python 2.4.6 (#1, Apr 26 2009, 10:35:06) [GCC 4.0.1 (Apple Inc. build
5465)]
* PIL 1.1.6
Running Mac OS X.
I build my plone instances by hand using paster and buildout only.
Thanks
rcecil wrote:
>
> Hello,
>
> I'm developing a custom AT type and I have created a new browser view
> (directoryentry.pt) that utilizes a css registered through a
> configure.zcml <browser:resource> stanza:
>
> <configure ...>
>
> <browser:resource
> name="twinpeaks-directoryentry.css"
> file="directoryentry.css"
> />
>
> <browser:resource
> name="frame.png"
> image="frame.png"
> />
>
> ...
>
> My utilization of the css is in directory.pt, right after the <body> tag:
>
> <metal:css fill-slot="css_slot">
> <style type="text/css" media="all"
> tal:content="string: @import
> url(${context/++resource++twinpeaks-directoryentry.css});"></style>
> </metal:css>
>
> When I view the browser view when the instance is running, and view
> source, I can see that the TAL expression has worked at it looks like:
>
> ...
> <style type="text/css" media="all"> @import
> url(http://localhost:8080/site/directory/cecil/++resource++twinpeaks-directoryentry.css);</style>
> ...
>
> The only problem is that the css in that file is not applied. It contains
> a single css stanza developed and tested to work using external static
> html.
>
> I can successfully bring up a browser image resource, by typing this
> directly into my browser ('cecil' is the title of an instance of my custom
> AT type):
>
> http://localhost:8080/site/directory/cecil/++resource++group.png
>
> I can see the graphic that verifies the browser resource registration
> succeeded for "group.png".
>
> However when I try the same technique on the actual css:
>
> http://localhost:8080/site/directory/cecil/++resource++twinpeaks-directoryentry.css
>
> I get a blank browser window, presumably because a zero-byte css file is
> returned.
>
> I get the same results when I turn portal_css debug mode on.
>
> Any ideas?
>
> Thanks in advance!
>
> Rob Cecil
>
>
--
View this message in context: http://n2.nabble.com/Trouble-with-custom-css-%28browser-resource%29-tp3004414p3004775.html
Sent from the User Interface & Design mailing list archive at Nabble.com.
More information about the UI
mailing list