ZCML Directives: zope.browserresource.metadirectives
¶
ZCML directives for defining browser resources
-
interface
zope.browserresource.metadirectives.
IBasicResourceInformation
[source]¶ This is the basic information for all browser resources.
-
layer
¶ The layer the resource should be found in
For information on layers, see the documentation for the skin directive. Defaults to “default”.
-
permission
¶ The permission needed to access the resource.
If a permission isn’t specified, the resource will always be accessible.
-
-
interface
zope.browserresource.metadirectives.
IResourceDirective
[source]¶ Extends:
zope.browserresource.metadirectives.IBasicResourceInformation
Defines a browser resource.
See also
-
name
¶ The name of the resource
This is the name used in resource urls. Resource urls are of the form
<site>/@@/resourcename
, where<site>
is the url of “site”, a folder with a site manager.We make resource urls site-relative (as opposed to content-relative) so as not to defeat caches.
-
factory
¶ Resource Factory
The factory used to create the resource. The factory should only expect to get the request passed when called.
-
file
¶ File
The file containing the resource data. The resource type that will be created depends on file extension. The named IResourceFactoryFactory utilities are registered per extension. If no factory is registered for given file extension, the default FileResource factory will be used.
-
image
¶ Image
If the image attribute is used, then an image resource, rather than a file resource will be created.
This attribute is deprecated in favor of pluggable resource types, registered per extension. Use the “file” attribute instead.
-
template
¶ Template
If the template attribute is used, then a page template resource, rather than a file resource will be created.
This attribute is deprecated in favor of pluggable resource types, registered per extension. Use the “file” attribute instead. To use page template resources, you need to install zope.ptresource package.
-
-
interface
zope.browserresource.metadirectives.
II18nResourceDirective
[source]¶ Extends:
zope.browserresource.metadirectives.IBasicResourceInformation
Defines an i18n’d resource.
-
name
¶ The name of the resource
This is the name used in resource urls. Resource urls are of the form
<site>/@@/resourcename
, where<site>
is the url of “site”, a folder with a site manager.We make resource urls site-relative (as opposed to content-relative) so as not to defeat caches.
-
defaultLanguage
¶ Default language
Defines the default language
-
-
interface
zope.browserresource.metadirectives.
II18nResourceTranslationSubdirective
[source]¶ Extends:
zope.browserresource.metadirectives.IBasicResourceInformation
Subdirective to
II18nResourceDirective
.-
language
¶ Language
Language of this translation of the resource
-
file
¶ File
The file containing the resource data.
-
image
¶ Image
If the image attribute is used, then an image resource, rather than a file resource will be created.
This attribute is deprecated, as images are now simply files. Use the “file” attribute instead.
-
-
interface
zope.browserresource.metadirectives.
IResourceDirectoryDirective
[source]¶ Extends:
zope.browserresource.metadirectives.IBasicResourceInformation
Defines a directory containing browser resources.
See also
-
name
¶ The name of the resource
This is the name used in resource urls. Resource urls are of the form
<site>/@@/resourcename
, where<site>
is the url of “site”, a folder with a site manager.We make resource urls site-relative (as opposed to content-relative) so as not to defeat caches.
-
directory
¶ Directory
The directory containing the resource data.
-
-
interface
zope.browserresource.metadirectives.
IIconDirective
[source]¶ Define an icon for an interface.
-
name
¶ The name of the icon.
The name shows up in URLs/paths. For example ‘foo’.
-
for_
¶ The interface this icon is for.
The icon will be for all objects that implement this interface.
-
file
¶ File
The file containing the icon.
-
resource
¶ Resource
A resource containing the icon.
-
title
¶ Title
Descriptive title
-
layer
¶ The layer the icon should be found in
For information on layers, see the documentation for the skin directive. Defaults to “default”.
-
width
¶ The width of the icon.
The width will be used for the <img width=”...” /> attribute. Defaults to 16.
-
height
¶ The height of the icon.
The height will be used for the <img height=”...” /> attribute. Defaults to 16.
-