It is very simple to configure the content objects
SELECTBOX
CHECKBOX and
RADIOBUTONS
All have a master template. You copy the master template to your view and you configure the properties only, which aren't configured for your needs.
If you are interested in the power of a master template, please look at
Reference 'SELECTBOX' on page 30 below
After copying you will see the powerful TypoScript code supported by the TypoScript Object Browser in your view array. It should be comprehensible, how to change any feature and property of your filter to your needs.
See section
'TypoScript Object Browser' on page 15 above and
Reference 'master_templates' on page 28 below
See the examples below.
Illustration 25: Quick Shop with the filter SELECTBOX
See the TypoScript on the next page.
TypoScript
See the line
// The filter becomes the property SELECTBOX
below in the snippet
plugin.tx_browser_pi1 {
...
views {
list {
1 {
select = ...
filter {
tx_quickshop_categories {
// The filter becomes the property SELECTBOX
title < plugin.tx_browser_pi1.displayList.master_templates.selectbox
title {
// Configuration SELECTBOX begin
first_item {
stdWrap {
data >
value = Select a Category
lang {
de = Kategorie wählen
}
}
}
wrap = <span class="selectbox">|</span>
wrap {
item {
stdWrap {
crop = 60 | ... | 1
}
}
}
// Configuration SELECTBOX end
}
}
}
}
}
single {
...
}
}
}
Easy way of configuring: See section 'TypoScript Object Browser' on page 15 above.
Illustration 26: Quick Shop with the filter CHECKBOX
TypoScript
See the line
// The filter becomes the property CHECKBOX
below in the snippet
plugin.tx_browser_pi1 {
...
views {
list {
1 {
...
filter {
tx_quickshop_categories {
// The filter becomes the property CHECKBOX
title < plugin.tx_browser_pi1.displayList.master_templates.checkbox
}
}
}
}
}
}
Illustration 27: Quick Shop with the filter RADIOBUTONS
TypoScript
See the line
// The filter becomes the property RADIOBUTONS
below in the snippet
plugin.tx_browser_pi1 {
...
views {
list {
1 {
...
filter {
tx_quickshop_categories {
// The filter becomes the property RADIOBUTONS
title < plugin.tx_browser_pi1.displayList.master_templates.radiobutons
}
}
}
}
}
}
The Browser filters are dynamically by default. This means:
If a filter item hasn't any hit, it won't be displayed.
Each filter controls all others..
We will change some TypoScript of the page http://gruene-autos.org/ for demonstration only.
See the examples below.
Illustration 28: Green Cars with three selectboxes - each with size = 1
This is the start page of http://gruene-autos.org/
It has three filters designed as selectboxes. Each displays one item only (HTML property size is 1).
The TypoScript for the three selectboxes should be clear (see the snippet below).
TypoScript
See the lines
// This filter becomes the property SELECTBOX
below in the snippet
plugin.tx_browser_pi1 {
...
views {
list {
1 {
select = ...
filter {
tx_greencars_engine {
// This filter becomes the property SELECTBOX
title < plugin.tx_browser_pi1.displayList.master_templates.selectbox
title {
first_item {
stdWrap {
data = LLL:EXT:green_cars/locallang_db.xml:tx_greencars_main.engine
}
}
wrap = |
}
}
tx_greencars_pricebracket {
// This filter becomes the property SELECTBOX
title < plugin.tx_browser_pi1.displayList.master_templates.selectbox
title {
first_item {
stdWrap {
data = LLL:EXT:green_cars/locallang_db.xml:tx_greencars_main.pricebracket
}
}
wrap = |
order {
field = uid
}
}
}
tx_greencars_type {
// This filter becomes the property SELECTBOX
title < plugin.tx_browser_pi1.displayList.master_templates.selectbox
title {
first_item {
stdWrap {
data = LLL:EXT:green_cars/locallang_db.xml:tx_greencars_main.type
}
}
wrap = |
}
}
}
}
}
}
}
For a better understanding of dynamic filters we change the properties of each selectbox. We like to display five items per box and we remove the title (the first item). See the illustration below.
Illustration 29: Green Cars with three selectboxes - each with size = 1
TypoScript
// Set the size of all boxes to 5
plugin.tx_browser_pi1.views.list.1.filter.tx_greencars_engine.title.size = 5
plugin.tx_browser_pi1.views.list.1.filter.tx_greencars_pricebracket.title.size = 5
plugin.tx_browser_pi1.views.list.1.filter.tx_greencars_type.title.size = 5
// Don't display the first_iem
plugin.tx_browser_pi1.views.list.1.filter.tx_greencars_engine.title.first_item = 0
plugin.tx_browser_pi1.views.list.1.filter.tx_greencars_pricebracket.title.first_item = 0
plugin.tx_browser_pi1.views.list.1.filter.tx_greencars_type.title.first_item = 0
Selection Case
We are interested in cars
with a diesel or domestic gas engine
with a price-bracket from 20.000 EUR to 25.000 EUR
Illustration 30: Green Cars with three selectboxes - each with size = 1
The values in the boxes will be changed after sending the form:
every item has a new number of hits
there are some items without any hit and they won't be displayed like
Coupe
all engines without a selection (of course)
all price-brackets without a selection (of course)
Illustration 31: Green Cars with three selectboxes - each with size = 1
Display price-brackets even if they haven't any hit
Illustration 32: Green Cars with three selectboxes - each with size = 1
TypoScript
// Display price-brackets even if they haven't any hit
plugin.tx_browser_pi1 {
views.list.1.filter.tx_greencars_pricebracket.title.wrap.item.display_without_any_hit = 1
}
Display price-brackets without the number of hits
Illustration 33: Green Cars with three selectboxes - each with size = 1
TypoScript
// Display price-brackets without the number of hits
plugin.tx_browser_pi1 {
views.list.1.filter.tx_greencars_pricebracket.title.wrap.item.display_hits = 0
}
Organiser1
Organiser (extKey: org) is a powerfull database for organisations, companies and organisers: You can publish all data in real terms. You can design an organisation with headquarters, locations, staff, events, news and documents. Org displays data in list, single and calendar views. Org hasn't any PHP code. It is based on the TYPO3-Fronend-Engine Browser. You can control and develop org by plugins and TypoScript. Org is in development. We intend to publish org at the 1st of April, 2011.
- Filter for a period (data area)Organiser (extKey: org) is a powerfull database for organisations, companies and organisers: You can publish all data in real terms. You can design an organisation with headquarters, locations, staff, events, news and documents. Org displays data in list, single and calendar views. Org hasn't any PHP code. It is based on the TYPO3-Fronend-Engine Browser. You can control and develop org by plugins and TypoScript. Org is in development. We intend to publish org at the 1st of April, 2011.
This is a typical example for a calendar.
This is the case:
dates of events are stored in a field "datetime"
the format of a date is a timestamp
the table tx_org_cal contains the field datetime. The table.field-syntax is: tx_org_cal.datetime
We have added the marker ###TX_ORG_CAL.DATETIME### to our HTML template into the filter section.
See section HTML Template on page 13 above.
plugin.tx_browser_pi1 {
views {
list {
201 {
name = Calendar
select (
tx_org_cal.title,
tx_org_cal.datetime
)
csvLinkToSingleView = tx_org_cal.title
filter {
tx_org_cal {
datetime < plugin.tx_browser_pi1.displayList.master_templates.selectbox
}
}
}
}
...
}
}
Result in the Frontend
Illustration 34: Calendar with select box
Comment
Line 11 to 13 (see page above): we allocates a filter for tx_org_cal.datetime in form of a SELECTBOX.
The items of the SELECTBOX are in our case:
<option value="1283968800">1283968800 (2)</option>
<option value="1304892000">1304892000 (1)</option>
<option value="1315591200">1315591200 (3)</option>
This means:
We have two dates at 1283968800, one date at ... and three dates at ...
But we don't want for every date an item in the selectbox. We want something like "Display the events of the last year, this year and the next year".
We want something like this:
<option value="10">2009 (0)</option>
<option value="20">2010 (2)</option>
<option value="30">2011 (4)</option>
We add an area out of the master template section and configure some properties.
plugin.tx_browser_pi1 {
views {
list {
201 {
name = Calendar
select (
tx_org_cal.title,
tx_org_cal.datetime
)
csvLinkToSingleView = tx_org_cal.title
filter {
tx_org_cal {
datetime < plugin.tx_browser_pi1.displayList.master_templates.selectbox
datetime {
// Every item should be displayed even though it hasn't any hit
wrap.item.display_without_any_hit = 1
// Order the items by uid (and not by value)
order.field = uid
// Allocates the master template sample_period
area < plugin.tx_browser_pi1.displayList.master_templates.areas.sample_period
}
}
}
}
}
...
}
}
Comment
Line 16:Every item should be displayed even though it hasn't any hit
Line 18:Order the items by uid (and not by value)
Line 20:This is the most important line. We allocate the master template sample_period.This template provides by default: - a period of years - a period from last year to next year (be aware of the relative period!) - and the items are formatted as year only.
Every property is configurable.
We get, what we want:
<option value="10">2009 (0)</option>
<option value="20">2010 (2)</option>
<option value="30">2011 (4)</option>









