Hedley Roos wrote:
I have a site with an admin and public interface, ie. the public site
does not need all the javascript and css from default Plone to be
loaded. I can reference the resources one by one in eg. main_template
(for public interface) and completely forego the resource registry,
but I'd rather not since the resource registry can merge etc. What is
the best way to instruct the resource registry that a resource is not
intended to be served in the public skin (or browser layer - doesn't
really matter)?

Hedley

Hey,

Maybe not exactly what you're looking for, but might help:

If you use collective.xdv, you can use the following expression to disable resources when the xslt theme is applied:

portal/@@xdv-check/enabled

Put it manually in the portal_css tool, or in your GS XML:

<?xml version="1.0"?>
<object name="portal_css">
   <stylesheet title=""
           id="mystyle.css"
           media="screen"
           rel="stylesheet"
           rendering="import"
           cacheable="True"
           compression="safe"
           cookable="True"
           enabled="1"
           expression="portal/@@xdv-check/enabled"
           />
</object>

AFAIK, you don't have to actually use xdv transforms with XSLT for this. Just install collective.xdv and activate it, to enable these expressions.

On localhost you then have collective.xdv enabled so that the resources are filtered and on 127.0.0.1 you still have all the resources loaded.

Cheers
JC






_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to