DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: rgaccordion

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2007-10-11T15:26:43
Author:Georg Ringer
Email:http://www.just2b.com
Info 3:
Info 4:

EXT: rgaccordion

Extension Key: rgaccordion

Copyright 2000-2002, Georg Ringer, <http://www.just2b.com>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: rgaccordion 1

Introduction 1

What does it do & Demonstration 1

Screenshots 1

Users manual 3

Configuration 3

rgaccordion I 3

rgaccordion II 3

Advanced configuration 4

rgaccordion I 4

rgaccordion II 4

rgaccordion & TemplaVoila 4

rgaccordion in a menu 4

Known problems 5

You like the extension? 5

To-Do list 5

Changelog 5

Introduction

What does it do & Demonstration

The Extension rgaccordion consists of 2 different modes which do basically the same but still with some differences. Both take normal content elements (like “Text”, “Text w Image” or plugins) and show them in an accordion. It is just perfect for long pages.

The extension t3mootools is required for rgaccordion I & II!

Screenshots

For a real impression, look at the given links above!

img-1

Image 1: The checkbox for rgaccordion I. Activate it to get the rgaccordion for this CE.

img-2

Image 2: 4 content elements in an accordion and the 2 nd element is opened.

img-3

Image 3: rgaccordion as a menu. See the section “rgaccordion in a menu” for more information.

Users manual

To get this extension started is very easy!

Download and install the extension.

Download and install the extension t3mootools. Follow the steps of the manual of t3mootools but in short take these steps:

Enter the Backend module “T3 Mootools” and select the view “Process & Analyze t3mootools.txt in extensions”.

Select all available extensions but at least “rgaccordion" and press “Check”.

Scroll down at the redirected page to the bottom and click “Merge & Use”.

Scroll down at the redirected page and click “Create Mootools Library”

Take a look at the section configuration (in this manual).

Configuration

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

rgaccordion I

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.

rgaccordion II

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.

Advanced configuration

The extension or better the javascript behind it is not restricted to content elements only. You can use it everywhere, e.g. in your template or inside your extension. To make this happen you just need a little a little knowledge how the code needs to look like.

rgaccordion I

The HTML needs to look like this

<div class=”rgaccord1-nest”>
        <h3 class=”rgaccord1-toggle”> Title 1</h3>
        <div class=”rgaccord1-content”>
                The content 1
        </div>
</div>
<div class=”rgaccord1-nest”>
        <h3 class=”rgaccord1-toggle”> Title 1</h3>
        <div class=”rgaccord1-content”>
                The content 1
        </div>
</div>

I added a sample of this for tt_news which is saved in res/tmpl/tt _news-rgaccordion1.html but just for the list view! It looks like this in real: http://www.rggooglemap.com/dev/rgaccordion/tt-news.html

rgaccordion II

The HTML needs to look like this:

<div id=”rgaccord2-nest”>
        <h3 class=”rgaccord2-toggle”> Title 1</h3>
        <div class=”rgaccord2-content”>
                The content 1
        </div>
        <h3 class=”rgaccord2-toggle”> Title 2</h3>
        <div class=”rgaccord2-content”>
                The content 2
        </div>
</div>

I added a sample of this for tt_news which is saved in res/tmpl/tt _news-rgaccordion2.html but just for the list view! It looks like this in real: http://www.rggooglemap.com/dev/rgaccordion2/tt- news.html

rgaccordion & TemplaVoila

According to a comment on my website this is the way how it should work with TV. This is not tested by me but thanks to Daniel V.

<TypoScript><![CDATA[
10= RECORDS
10.source.current=1
10.tables = tt_content
10.wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end-->
10.conf.tt_content < plugin.tx_rgaccordion2
10.conf.tt_content.stdWrap.wrap = <div id="rgaccord2-nest">|</div>
]]></TypoScript>

It would be great If someone could confirm this configuration and write a short note per mail or as comment on my website.

rgaccordion in a menu

The script of this extension can also be used to create a very nice menue. This could look like this in German http://www.rggooglemap.com/dev/rgaccordion2/in-ein-menue- intergriert.html and English http://www.rggooglemap.com/en/dev/rgaccordion2/integrated- in-a-menu.html .

You will also find a sample of this menu inside the extension directory ext/rgaccordion/res/menu/menu.html.

The needed TS for this is:

# TS Code
lib.accordionmenu = HMENU
lib.accordionmenu {

        1 = TMENU
        1 {
                wrap = <ul id="rgaccordmenu">|</ul>
                noBlur = 1
                expAll = 1

                NO = 1
                NO.wrapItemAndSub = <li>|</li>
                NO.linkWrap = <span class="empty">|</span>

                IFSUB <.NO
                IFSUB.linkWrap = <span class="toggle">|</span>
                IFSUB.doNotLinkIt = 1

                ACTIFSUB <.NO
                ACTIFSUB.linkWrap = <span class="open toggle">|</span>
        }

        2 <.1
        2 {
                wrap = <ul class="content">|</ul>
                NO.linkWrap >
                IFSUB.linkWrap = <span class="toggle2">|</span>
                ACTIFSUB.linkWrap = <span class="open toggle2">|</span>
        }

        3 <.2
        3 {
                wrap = <ul class="content2">|</ul>
        }
}

# Include the JS and CSS files
page.includeCSS.file7 = EXT:rgaccordion/res/menu/menu.css
page.includeJS.file1  = EXT:rgaccordion/res/menu/mootools.js
page.includeJS.file2  = EXT:rgaccordion/res/menu/menu.js

The values of the classes like “open”, “toggle”, “toggle2” need to stay like this as long as you don't change it in the needed js file too! “open” is required to open the current level (if selected).

Known problems

If you got troubles with the Internet Explorer not collapsing/expanding the levels, use the following TS

#TS Code
     [browser = msie]
  • config.doctypeSwitch = 1
    
    [global]
    
  • It is not really possible to use more than one javascript library at the same website. So if you use e.g. prototype you will get troubles with Mootools and the other way round.

  • If you want to change the class/id names you also need to change them in the javascript files because this is hardcoded to make the extension as simple as possible!

You like the extension?

If you like this extension, you can do one or more of the following things:

Write me a mail or create a posting at the demo websites and express your feelings

Please rate the extension in the Repository: http://typo3.org/extensions/ search for rgaccordion, click on the title and then at “Ratings” (You need to be registered and logged in at typo3.org) – this just takes 1min and I like good ratings.

Donate something, so that I can write those kind of extensions for you. More information is here: German: http://www.rggooglemap.com/menu/spende.html and English: http://www.rggooglemap.com/en/2/donate.html . Thanks!

To-Do list

- Nothing planned but if you got an idea, you can tell me.

Changelog

- 1.1.1. Manual update. Hint for IE6 troubles

- 1.1.0. Added a TV section

- 1.0.2. Changed manual concerning including the file order, sorry guys!

- 1.0.1. Manual update

- 1.0.0. Initial release – nothing else planned.

img-4 EXT: rgaccordion - 5