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.pngI 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.cssI 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