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: KB Content Slide

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2005-03-22T14:16:32
Author:Kraft Bernhard
Email:kraftb@mokka.at
Info 3:
Info 4:

EXT: KB Content Slide

Extension Key: kb_cont_slide

Copyright 2004-2005, Kraft Bernhard, <kraftb@mokka.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.com

Table of Contents

EXT: KB Content Slide 1

Introduction 1

What does it do? 1

Configuration 1

Getting the Extension into the page 1

Selecting the correct column 2

Complete configuration 2

Known problems 2

Changelog 2

Credits 2

Introduction

What does it do?

This extension enables an administrator to display content of a specific column in Typo3 (Normal, Left, Right Border). But rather than just displaying the content of the actual page it checks if the specified column contains something and if not it displays this column but from the previous page (where previous means the page before in the rootline). If also the previous page doesn't contain something it displays the contents of their parent page and so on.

Configuration

Here you will learn how to configure this extension. The configuration is split into two parts. The first one is about how to get the plugin into your HTML template and is already covered by some other Typo3 Documentation. The second part is especially about configuring this extension but depends mostly on the CONTENT TypoScript element as defined in the TSREF ( TSREF - Content Objects - CONTENT )

Getting the Extension into the page

After installing the extension you will have to include it somehow in your TypoScript Setup. You will need a place where to put the contents of the extension (a marker in your HTML template).

Lets say you have defined a "DIV" with ID "leftcontent"

<div id="leftcontent">Left</div>

Then you assign the result of this extension to this marker. This is different wheter you use normal markers or the Template Auto Parser. I give examples for both:

With "normal" markers:

temp.mytemplate.marks.leftcontent < plugin.tx_kbcontslide_pi1

or with the Template Autoparser

temp.mytemplate.subparts.leftcontent < plugin.tx_kbcontslide_pi1

After this assignment you can take a look on your webpage (don't forget to clear the cache if you make changes) and you will notice that the content of the DIV "leftcontent" is already replaced by the content of the "Normal" column.

Selecting the correct column

By default this extension displays the content of the "Normal" column. You can see how this default is achieved by looking at "EXT_DIR/ext_typoscript_setup.txt".

If you (most probably) want to change it to another column add the following TypoScript code to one of your templates. But be sure that the configuration of this extension is done before the plugin is assigned to a HTML marker.

plugin.tx_kbcontslide_pi1.content.select.where = colPos=1

If the plugin is configured this way it will display the contents of the "Left" column.

Complete configuration

So the complete TypoScript setup for this extension will look like:

plugin.tx_kbcontslide_pi1.content.select.where = colPos=1
temp.mytemplate.subparts.leftcontent < plugin.tx_kbcontslide_pi1

It is also possible to modify the "plugin.tx_kbcontslide_pi1.content" further. You could for example define a more complex where statement. The extension uses standard Typo3 functions for generating the content so you could also overwrite the "content = CONTENT" definition from ext_typoscript_setup.txt with something completly different. But then the function of this plugin will most probably be userless (Pherhaps somebody finds some other use for this extension).

Having more than one Column using Content Slide

If you have more than one column which you would like to use with kb_cont_slide there is of course the possibility to do so. Instead of using the Content Slide TS object directly you have to assign it to your column first and then make all necessary settings. So the settings for each column don't overwrite each other.

To make a setup where 2 Columns are used by KB Content Slide you will need a TS setup similar to the followin:

lib.news < plugin.tx_kbcontslide_pi1
lib.news.content.select.where = colPos=2

lib.skurril < plugin.tx_kbcontslide_pi1
lib.skurril.content.select.where = colPos=4

Also you see that in this case I used “lib.” objects. As this setup was used on a TemplaVoila site. So Content Slide also works with Templa Voila !!!

The only difference to the previous examples is that the “where” is not set directly in plugin.tx_kbcontslide_pi1 but in a copied object.

Known problems

As this is the first release of this extension there are no reported problems.

Technical

For people interested in how this extension works: The contents of each column are simply rendered using the native “normal” Typo3 methods which get used for rendering a column. When the content of another page than the actual needs to get rendered because there is no content on the actual page then the UID of the parent page is simulated to the rendering methods. In fact I overwrite “$GLOBALS['TSFE']->contentPid” temporarly and set it back to the original value after rendering the column. Some people meant that this could lead to unexpected results with the other rendering but AFAIK the value of $GLOBALS['TSFE']->contentPid is never transferred to a another variable.

Changelog

0.0.1

Version

0.0.1

Date

2004-12-23, 16:00

Changelog

Initial release

0.1.0

Version

0.1.0

Date

2005-03-22, 14:15

Changelog

  • Added “orderBy” statement in default TS Setup
  • Added paragraph, which explains how to have more than one Content Slide Column, to the documentation

0.1.1

Version

0.1.1

Date

2005-03-22, 14:30

Changelog

Added note on how the extension works in the documentation (Section “Technical”)

Credits

Credits go to my boss Willi for letting me write this extension and especially the documentation during work time.

img-1 EXT: KB Content Slide - 2