-
Notifications
You must be signed in to change notification settings - Fork 0
/
view.html.twig
46 lines (35 loc) · 1.37 KB
/
view.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{% do pimcore_head_script().appendFile(asset('/bundles/web2printtools/vendor/js/awesomizr.js')) %}
{% if not editmode %}
<script type="text/javascript">
$(document).ready(function() {
Awesomizr.createTableOfContents({
/* toc container */
insertiontarget: '#toc-wrapper',
insertiontype: 'beforeend',
/* levels to look for and link to in toc*/
elements: ['h1','h2'],
/* container element for the toc */
container: {tag: 'ul', addClass: 'toc'},
/* container element for one line in the toc */
line: {tag: 'li'},
disabledocumenttitle: true,
toctitle: ' ',
/* method of getting the text for the toc lines */
text: function (elem) {
return elem.textContent;
}
});
});
</script>
{% endif %}
<div id="toc-wrapper">
<h1>{{ pimcore_input('heading') }}</h1>
<p>{{ pimcore_wysiwyg('introtext') }}</p>
{% if editmode %}
TABLE OF CONTENTS IS GENERATED ON PDF-EXPORT
{% endif %}
</div>
{% if not editmode %}
<div class="toc-footer-text-placeholder-left">{{ pimcore_input('heading') }}</div>
<div class="toc-footer-text-placeholder-right">{{ pimcore_input('heading') }}</div>
{% endif %}