Both modes use the same cObj “CONTENT”. So you can use the accordion everywhere where you use this cObj!. Examples are:
Content elements of a column
Content elements of a special page
To use this mode you just need the following lines. Only these content elements in which the checkbox “Accordion” (at the top right corner) is checked the accordion will get shown.
# Activate rgaccordion for the main column
page.10.subparts.TPL_CONTENT.renderObj < plugin.tx_rgaccordion1
# Include the JS and CSS (demo) files
page.includeCSS.file57 = EXT:rgaccordion/res/rgaccordion1.css
page.includeJS.file51 = EXT:t3mootools/res/mootoolsv1.11.js
page.includeJS.file52 = EXT:rgaccordion/res/rgaccordion1.js
Explanation
“subparts.TPL_CONTENT” stands for the subpart where you want to use it! This depends on your template.
FAQ
Q: How can I render every content element as accordion?A: Take the line: plugin.tx_rgaccordion1.stdWrap.outerWrap.fieldRequired >
Q: I want to change the path of the CSS file. How?A: Just change the page.include.CSS.fileXX to anywhere you want.
To use this mode you just need the following lines. All content elements of the cObj CONTENT(e.g. all CE of a column) are rendered in one accordion.
# Activate rgaccordion for the main column
page.10.subparts.TPL_CONTENT.wrap = <div id="rgaccord2-nest">|</div>
page.10.subparts.TPL_CONTENT.renderObj < plugin.tx_rgaccordion2
# Include the JS and CSS files
page.includeCSS.file57 = EXT:rgaccordion/res/rgaccordion2.css
page.includeJS.file51 = EXT:t3mootools/res/mootoolsv1.11.js
page.includeJS.file52 = EXT:rgaccordion/res/rgaccordion2.js
Explanation
“subparts.TPL_CONTENT” stands for the subpart where you want to use it! This depends on your template.