Вот рабочий пример из Учебной документации Plone .
А вот исходный код .
.. admonition:: Solution
:class: toggle
* Go to the dexterity-controlpanel (http://localhost:8080/Plone/@@dexterity-types)
* Click on *Page* (http://127.0.0.1:8080/Plone/dexterity-types/Document)
* Select the tab *Behaviors* (http://127.0.0.1:8080/Plone/dexterity-types/Document/@@behaviors)
* Check the box next to *Lead Image* and save.
The история изменений показывает, что в тему были добавлены пользовательские JavaScript и стиль.
_static / custom. css
.toggle {
background: none repeat scroll 0 0 #e7f2fa;
}
.toggle .admonition-title {
display: block;
clear: both;
}
.toggle .admonition-title:after {
content: " ▼";
}
.toggle .admonition-title.open:after {
content: " ▲";
}
_templates / page. html
{% set css_files = css_files + ["_static/custom.css"] %}
{%- block extrahead %}
<script type="text/javascript">
$(document).ready(function() {
//
//
$(".toggle > *").hide();
$(".toggle .admonition-title").show();
$(".toggle .admonition-title").click(function() {
$(this).parent().children().not(".admonition-title").toggle(400);
$(this).parent().children(".admonition-title").toggleClass("open");
})
});
</script>
{% endblock %}