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”.
Implementation: zope.configuration.fields.GlobalInterface
Read Only: False Required: False Default Value: None Value Type
Implementation: zope.schema.InterfaceField
Read Only: False Required: True Default Value: None
-
-
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.
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: unicode
-
factory
¶ Resource Factory
The factory used to create the resource. The factory should only expect to get the request passed when called.
Implementation: zope.configuration.fields.GlobalObject
Read Only: False Required: False Default Value: None
-
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.
Implementation: zope.configuration.fields.Path
Read Only: False Required: False Default Value: None Allowed Type: unicode
-
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.
Implementation: zope.configuration.fields.Path
Read Only: False Required: False Default Value: None Allowed Type: unicode
-
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.
Implementation: zope.configuration.fields.Path
Read Only: False Required: False Default Value: None Allowed Type: unicode
-
-
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.
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: unicode
-
defaultLanguage
¶ Default language
Defines the default language
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: unicode
-
-
interface
zope.browserresource.metadirectives.
II18nResourceTranslationSubdirective
[source]¶ Extends:
zope.browserresource.metadirectives.IBasicResourceInformation
Subdirective to
II18nResourceDirective
.-
language
¶ Language
Language of this translation of the resource
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: unicode
-
file
¶ File
The file containing the resource data.
Implementation: zope.configuration.fields.Path
Read Only: False Required: False Default Value: None Allowed Type: unicode
-
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.
Implementation: zope.configuration.fields.Path
Read Only: False Required: False Default Value: None Allowed Type: unicode
-
-
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.
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: unicode
-
directory
¶ Directory
The directory containing the resource data.
Implementation: zope.configuration.fields.Path
Read Only: False Required: True Default Value: None Allowed Type: unicode
-
-
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’.
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: unicode
-
for_
¶ The interface this icon is for.
The icon will be for all objects that implement this interface.
Implementation: zope.configuration.fields.GlobalInterface
Read Only: False Required: True Default Value: None Value Type
Implementation: zope.schema.InterfaceField
Read Only: False Required: True Default Value: None
-
file
¶ File
The file containing the icon.
Implementation: zope.configuration.fields.Path
Read Only: False Required: False Default Value: None Allowed Type: unicode
-
resource
¶ Resource
A resource containing the icon.
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: unicode
-
title
¶ Title
Descriptive title
Implementation: zope.configuration.fields.MessageID
Read Only: False Required: False Default Value: None Allowed Type: unicode
-
layer
¶ The layer the icon should be found in
For information on layers, see the documentation for the skin directive. Defaults to “default”.
Implementation: zope.configuration.fields.GlobalInterface
Read Only: False Required: False Default Value: None Value Type
Implementation: zope.schema.InterfaceField
Read Only: False Required: True Default Value: None
-