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: Rotate Content¶
Created: | 2010-02-18T17:33:18 |
---|---|
Changed by: | Markus Kappe |
Changed: | 2012-06-06T17:09:04.530000000 |
Classification: | dix_rotatecontent |
Description: | The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ---- |
Keywords: | jQuery, content slide, codaslider, forEditors, forAdmins, forDevelopers, forIntermediates |
Author: | Markus Kappe |
Email: | markus.kappe@dix.at |
Info 4: | |
Language: | en |
EXT: Rotate Content - dix_rotatecontent
EXT: Rotate Content¶
Extension Key: dix_rotatecontent
Language: en
Keywords: jQuery, content slide, codaslider, forEditors, forAdmins, forDevelopers, forIntermediates
Copyright 2000-2010, Markus Kappe, <markus.kappe@dix.at>
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.org
Table of Contents¶
`Introduction 3 <#__RefHeading__1283_769116936>`_
`Users manual 5 <#__RefHeading__1291_769116936>`_
`Administration 6 <#__RefHeading__1297_769116936>`_
`Configuration 7 <#__RefHeading__1301_769116936>`_
`FAQ / Known problems 9 <#__RefHeading__1307_769116936>`_
`To-Do list 10 <#__RefHeading__1309_769116936>`_
`ChangeLog 11 <#__RefHeading__1311_769116936>`_
Introduction¶
What does it do?¶
With this extension you can display alternating content elements. After a configurable number of seconds the display changes using a smooth scrolling effect.
It uses jQuery and coda-slider to do that.
Users manual¶
To use this extension you just have to insert a content element from type “plugin” and select “Rotate Content” plugin. Then you create as many contents within as you like. Each content becomes a single panel (that means each content is displayed at a time). You can even choose “Insert Records” to join many other contents in one panel.
On how to administrate and install the extension see next chapter
Administration¶
Installation¶
- Install Extension using the extension manager and update the database.
- Create a page (folder) where the contents will get stored. Write down the page id.
- Configure the extension using the extension manager. Choose which resources should be included, set the default interval, and MOST IMPORTANT set the page id (PID) you have written down in the previous step.
- Open your TypoScript and set the width of the displayed content (default is 400 pixels)
tx_dixrotatecontent.width = 400
Configuration¶
Reference¶
TypoScript constants: tx_dixrotatecontent_pi1
width¶
Property
width
Data type
int
Description
The width in pixels
Default
400
[tsref: tx_dixrotatecontent_pi1]
TypoScript setup: plugin.tx_dixrotatecontent_pi1
template¶
Property
template
Data type
string
Description
The template that is used to render the HTML
Default
EXT:dix_rotatecontent/res/template.html
include.jQuery¶
Property
include.jQuery
Data type
string
Description
This resource is included as <script> in the head section, if activated in the extension manager
include.codaslider¶
Property
include.codaslider
Data type
string
Description
This resource is included as <script> in the head section, if activated in the extension manager
Default
EXT:dix_rotatecontent/res/jquery.coda-slider-2.0.js
include.css¶
Property
include.css
Data type
string
Description
This resource is included as <link> in the head section, if activated in the extension manager.
Please notice that there is more CSS included using _CSS_DEFAULT_STYLE
Default
EXT:dix_rotatecontent/res/coda-slider-2.0.css
options¶
Property
options
Data type
→ see next section
Description
Options for the configuration of coda-slider
Default
_CSS_DEFAULT_STYLE¶
Property
_CSS_DEFAULT_STYLE
Data type
string
Description
Default CSS style
Default
→ see next section
[tsref: plugin.tx_dixrotatecontent_pi1]
TypoScript setup: plugin.tx_dixrotatecontent_pi1.options
Please see http://www.ndoherty.biz/forums/viewtopic.php?f=4&t=2 for exact documentation of the options
autoHeight¶
Property
autoHeight
Data type
bool
Description
Default
true
autoHeightEaseDuration¶
Property
autoHeightEaseDuration
Data type
int
Description
Default
1000
autoHeightEaseFunction¶
Property
autoHeightEaseFunction
Data type
string
Description
Default
swing
autoSlide¶
Property
autoSlide
Data type
bool
Description
Default
true
autoSlideInterval¶
Property
autoSlideInterval
Data type
int
Description
Default
autoSlideStopWhenClicked¶
Property
autoSlideStopWhenClicked
Data type
bool
Description
Default
false
crossLinking¶
Property
crossLinking
Data type
bool
Description
Default
true
dynamicArrows¶
Property
dynamicArrows
Data type
bool
Description
Default
true
dynamicArrowLeftText¶
Property
dynamicArrowLeftText
Data type
string
Description
Default
« left
dynamicArrowRightText¶
Property
dynamicArrowRightText
Data type
string
Description
Default
right »
dynamicTabs¶
Property
dynamicTabs
Data type
bool
Description
Default
true
dynamicTabsAlign¶
Property
dynamicTabsAlign
Data type
sting
Description
Default
center
dynamicTabsPosition¶
Property
dynamicTabsPosition
Data type
string
Description
Default
bottom
externalTriggerSelector¶
Property
externalTriggerSelector
Data type
string
Description
Default
a.xtrig
firstPanelToLoad¶
Property
firstPanelToLoad
Data type
int
Description
Default
1
panelTitleSelector¶
Property
panelTitleSelector
Data type
string
Description
Default
span.tabTitle
slideEaseDuration¶
Property
slideEaseDuration
Data type
int
Description
Default
1000
slideEaseFunction¶
Property
slideEaseFunction
Data type
string
Description
Default
swing
[tsref: plugin.tx_dixrotatecontent_pi1.options]
css¶
Default styles¶
plugin.tx_dixrotatecontent_pi1._CSS_DEFAULT_STYLE (
.coda-slider-wrapper { padding: 10px; padding-bottom: 16px; background: #eee; display: inline-block; position: relative; }
/* Use this to keep the slider content contained in a box even when JavaScript is disabled */
.coda-slider-no-js .coda-slider { height: 200px; overflow: auto !important; padding-right: 20px; }
/* Change the width of the entire slider (without dynamic arrows) */
.coda-slider, .coda-slider .panel { width: {$tx_dixrotatecontent.width}px; }
/* Change margin and width of the slider (with dynamic arrows) */
.coda-slider-wrapper.arrows .coda-slider, .coda-slider-wrapper.arrows .coda-slider .panel { width: {$tx_dixrotatecontent.width}px; }
.coda-slider-wrapper.arrows .coda-slider { margin: 0 10px; }
/* Arrow styling */
.coda-nav-left a, .coda-nav-right a { background: #000; color: #fff; padding: 5px; width: 100px }
/* Tab nav */
.coda-nav ul { position: absolute; bottom: 4px; left: 6px; list-style-type: none; margin: 0; padding: 0; z-index: 99999; }
.coda-nav ul li { display: inline; padding: 0; margin: 0; }
.coda-nav ul li a { display: inline; color: green; padding: 2px 4px; text-decoration: none; font-size: 1.5em; }
.coda-nav ul li a:hover { text-decoration: none; color: yellow; }
.coda-nav ul li a.current { text-decoration: underline; }
/* Panel padding */
.coda-slider .panel-wrapper { padding: 0px; }
)
Copy and paste it to your TS setup, then modify it to fit your needs.
Examples¶
Change padding¶
What
Change padding
CSS
.coda-slider-wrapper { padding: 0px; }
Change background¶
What
Change background
CSS
.coda-slider-wrapper { background: transparent; }
Change the color of the bullets¶
What
Change the color of the bullets
CSS
.coda-nav ul li a { color: blue; }
.coda-nav ul li a:hover { color: red; }
FAQ / Known problems¶
Q: The $ (shortcut for jQuery) is not available. Why?
A: To avoid conficts with other javascript frameworks (e.g. mootools, prototype, …) jQuery runs with the noConflict() option. If you don't want that, you have to deactivate the automatic inclusion of jQuery and include it yourself.
Q: When saving the content I get the error message "1: Attempt to insert record on page '[root-level]' (0) where thistable, tt_content, is not allowed". What is wrong?
A: Probably you didn't set the PID in the extension manager.
Q: Can I insert multiple instances of this plugin on one page?
A: Yes
Q: Can I give different plugins on the same page different widths?
A: Yes, you have to do that with CSS. Something like this will do the trick:
#col1 .coda-slider-wrapper.arrows .coda-slider, #col1 .coda-slider-wrapper.arrows .coda-slider .panel, #col1 .coda-slider, #col1 .coda-slider .panel { width: 200px; }
#col2 .coda-slider-wrapper.arrows .coda-slider, #col2 .coda-slider-wrapper.arrows .coda-slider .panel, #col2 .coda-slider, #col2 .coda-slider .panel { width: 350px; }
(Wath the use of the #col1 and #col2 selector)
Q: Can I give different plugins on the same page different intervals?
A: No
Q: Can I change the scrolling direction from left/right to top/bottom?
A: No
Q: Can I change the scrolling so that when the panel changes from the last one to the first one it scrolls to the right instead of passing all the panels in the middle when scrolling to the left?
A: No
Q: I am an awesome JavaScript hacker, and I pimped the coda-slider with an awesome feature. Can you include it in your extension?
A: Yes, please send me an email to markus.kappe@dix.at
Q: Can you make an additional feature for me?
A: Maybe, please send me an email to markus.kappe@dix.at
Q: Can I name the panels (for use in the tab nav)?
A: Yes, set the option panelTitleSelector to something like “h2” and make sure the content elements contain a <h2>
Q: It doesn't work. How do I debug it?
A: Use Firebug (Extension to Firefox) and look out for JavaScript errors
To-Do list¶
- Test it with many different browsers
- Maybe add some cool default CSS for dynamicArrows
ChangeLog¶
- Create a file "ChangeLog" (see e.g. the extension "cal" as example) to inform about changes or
- Use this section to document all the changes through the versions.
- Alternative to the following list: ChangeLog online (point this link to YOUR extension)
1.0.1¶
Version
1.0.1
Changes
First public version
1.1.0¶
Version
1.1.0
Changes
Added documentation, made cool CSS for tab nav, added options to TypoScript
1.2.0¶
Version
1.2.0
Changes
Added swipe support, changed default CSS (no padding, cooler bullet points)
11