[Plone-UI] Trouble with custom css (browser resource)
rcecil
rob.cecil at gmail.com
Mon Jun 1 06:11:44 UTC 2009
Solved that problem. Turns out my i18n:domain attribute was set incorrectly
in the page template.
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-tp3004414p3004846.html
Sent from the User Interface & Design mailing list archive at Nabble.com.
More information about the UI
mailing list