![]() |
|
|
|
|
Change By:
|
Roman Kovařík
(12/Jun/13 12:58 PM)
|
|
Description:
|
When the availability isn't defined, than the
If we want to use IoC for
default
one from
{{
info.magnolia.rendering.template.configured.ConfiguredTemplateDefinition
TemplateAvailability
}}
is used:
{code} ... public ConfiguredTemplateDefinition() { this.templateAvailability =
, we must create
new
TemplateAvailability()
constructor for
{
@Override public boolean isAvailable(Node content, TemplateDefinition templateDefinition)
{
// by default a template is available only in the website workspace try { return content.getSession().getWorkspace().getName().equals("website") && StringUtils.substringAfter(templateDefinition.getId(), ":").startsWith("pages/");
TemplateDefinition
}
catch (RepositoryException e) { return false;
}
} }; }
s in this module
.
.. {code} The default TemplateAvailability value should be configurable.
See
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <
[email protected]>
----------------------------------------------------------------