Module chrome
source code
|
|
INavigationContributor
Extension point interface for components that contribute items to the
navigation.
|
|
|
ITemplateProvider
Extension point interface for components that provide their own
ClearSilver templates and accompanying static resources.
|
|
|
Chrome
Web site chrome assembly manager.
|
|
|
add_meta(req,
content,
http_equiv=None,
name=None,
scheme=None,
lang=None)
Add a <meta> tag into the <head> of the generated HTML. |
source code
|
|
|
|
add_link(req,
rel,
href,
title=None,
mimetype=None,
classname=None,
**attrs)
Add a link to the chrome info that will be inserted as <link> element in
the <head> of the generated HTML |
source code
|
|
|
|
add_stylesheet(req,
filename,
mimetype='text/css',
media=None)
Add a link to a style sheet to the chrome info so that it gets included
in the generated HTML page. |
source code
|
|
|
|
add_script(req,
filename,
mimetype='text/javascript')
Add a reference to an external javascript file to the template. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_ctxtnav(req,
elm_or_label,
href=None,
title=None)
Add an entry to the current page's ctxtnav bar. |
source code
|
|
|
|
|
Imports:
datetime,
itertools,
os,
pkg_resources,
pprint,
re,
StringIO,
Markup,
tag,
Element,
Attrs,
START,
Translator,
DocType,
TemplateLoader,
MarkupTemplate,
NewTextTemplate,
VERSION,
IEnvironmentSetupParticipant,
ISystemInfoProvider,
get_mimetype,
Context,
compat,
get_reporter_id,
presentation,
get_pkginfo,
pathjoin,
translation,
any,
partial,
escape,
plaintext,
pretty_size,
obfuscate_email_address,
shorten_line,
unicode_quote_plus,
to_unicode,
javascript_quote,
exception_to_unicode,
pretty_timedelta,
format_datetime,
format_date,
format_time,
from_utimestamp,
http_date,
utc,
_,
get_available_locales,
IRequestHandler,
ITemplateStreamFilter,
HTTPNotFound,
Href,
IWikiSyntaxProvider,
format_to,
format_to_html,
format_to_oneliner,
BoolOption,
ChoiceOption,
Component,
Configuration,
ConfigurationError,
ExtensionOption,
ExtensionPoint,
FloatOption,
IResourceManager,
IntOption,
Interface,
ListOption,
Option,
OrderedExtensionsOption,
PathOption,
Resource,
ResourceNotFound,
ResourceSystem,
TracError,
get_relative_resource,
get_relative_url,
get_resource_description,
get_resource_name,
get_resource_shortname,
get_resource_summary,
get_resource_url,
implements,
render_resource_link,
resource_exists
add_stylesheet(req,
filename,
mimetype='text/css',
media=None)
| source code
|
Add a link to a style sheet to the chrome info so that it gets included
in the generated HTML page.
If the filename is absolute (i.e. starts with a slash), the generated link
will be based off the application root path. If it is relative, the link
will be based off the /chrome/ path.
|
add_script(req,
filename,
mimetype='text/javascript')
| source code
|
Add a reference to an external javascript file to the template.
If the filename is absolute (i.e. starts with a slash), the generated link
will be based off the application root path. If it is relative, the link
will be based off the /chrome/ path.
|
|
Add data to be made available in javascript scripts as global variables.
The keys in data provide the names of the global variables. The values
are converted to JSON and assigned to the corresponding variables.
|
Add a non-fatal warning to the request object.
When rendering pages, any warnings will be rendered to the user.
|
Add an informational notice to the request object.
When rendering pages, any notice will be rendered to the user.
|
prevnext_nav(req,
prev_label,
next_label,
up_label=None)
| source code
|
Add Previous/Up/Next navigation links.
@param req a Request object
@param prev_label the label to use for left (previous) link
@param up_label the label to use for the middle (up) link
@param next_label the label to use for right (next) link
|