Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source MagazineAOE Media

1.6. Configuration

You can configure a lot of the kb_shop FE plugin via TypoScript most notably to mention is the possibility to insert custom cObjects and let get fields passed through stdWrap. For many of you which are not that fit it isn't that clear which possibilities this does offer. stdWrap is some kind of magic function which calls almost any other method of the FE content rendering object (a cObject). It is some kind of branch to mostly the compete functionality of TYPO3 FE capabilities. It allows you to insert custom cObjects TEXT/IMAGE(GIFBUILDER)/RECORDS/CONTENT etc. It also has a lot of text-processing capabilities.

Following is a table of all TS properties of plugin.tx_kbshop_pi1. Those properties will completely be the same as for plugin.tx_kbshop_pi2 which will be the none cached plugin used for displaying full-text-search results.

The main plugin configuration containers

On the top of the plugin configuration in plugin.tx_kbshop_pi1 there are mostly containers for the main parts which get rendered like listing, single view, criteria selector or forms.

Property

Data type

Description

Default

forms

container

Contains all properties for ordering forms.

listView

container

Contains all properties for listView. They are the same for singleView. The separation between listView and singleView in the TS is here to enable you to have different cObjects and similar for list and single view.

singleView

container

The container for the singleView properties can contain the same subproperties than listView (see table below)

subpart.listView

subpart.singleView

string

This TS values define which HTML template main-subpart will get used for rendering the current view. Normally TMPL_listView gets used for list view. But when you set

subpart.listView = myTemplate

for example then the subpart ###TMPL_listView_myTemplate### will get used.

criteriaSelector

container

Container for the criteriaSelector configuration

fieldTypes

container

Container for the configuration of some field types (like labels for multi checkboxes)

template.listView

string / stdWrap

The template file which get's used when a listiing gets generated.

template.singleView

string / stdWrap

The template file which gets used when a single record gets shown

plugin.tx_kbshpo_pi1 / plugin.tx_kbshop_pi2

The "criteriaSelector" container

In this container you will find properties useful for configuring the criteria selector selct-boxes, text-links, or checkboxes.

Property

Data type

Description

Default

selectedValue

string

This value gets inserted into the ###SELECTED### marker of a criteria item option/link when it's value has been selected for filtering. For normal criterias.

selected="selected"

checkedValue

string

This value gets inserted into the ###CHECKED### marker of a criteria item checkbox when it has been checked for filtering. For checkbox criterias

checked="checked"

dateFormat

string (strftime)

This value specified how dates should get displayed in the critieria selector.

%Y-%m-%d %H:%M,%S

checkbox.yes

checkbox.no

string / stdwrap

Specified the label ###LABEL### for a checkbox criteria which gets rendered as selectbox (Yes/No select-box).

LLL:criteriaSelector_checkbox_yes

LLL:criteriaSelector:_checkbox_no

plugin.tx_kbshop_pi1.criteriaSelector / plugin.tx_kbshop_pi2.criteriaSelector

The "fieldTypes" container

This container allows to set some configuration which define how multi checkbox values get rendered.

Property

Data type

Description

Default

multiCheck.nothingSet

string

The label which gets used when no checkbox of a multi-checkbox field has been set.

LLL:label_none

multiCheck.implodeString

The string which gets used for imploding the single values  which have been checked in a mult checkbox

" / "

plugin.tx_kbshop_pi1.fieldTypes / plugin.tx_kbshop_pi2.fieldTypes

The "forms" container

In this container properties can get set which set some aspects of how ordering forms get rendered. The .forms container is available on more than one possition. 3 to be exact. first on the plugin.tx_kbshop_pi1 top level itself. On this first level the following properties are valid:

Property

Data type

Description

Default

doublePostDelay

integer

Number in seconds which is waited until a new order with the same content get's accepted. This inhibits double posting of values on final submit. (Only available in the top-level forms container)

600

formAddParams

string

Parameters which get added to the <form> tag generated for ordering forms. (Only available in the top-level forms container)

respectRequired

string

A list of tables (comma separated) which defined in which table the fields set as "required" are respected. (Only available in the top-level forms container)

noCache

boolean

When set the no_cache parameter will be added to the URL when sending a form to another page or sending the Location header which redirects the user to another page after successful completion of a form (See FE-Plugin field: Submit Target OK)

plugin.tx_kbshop_pi1.forms / plugin.tx_kbshop_pi2.forms

On the other levels (plugin.tx_kbshop_pi1.listView.forms and plugin.tx_kbshop.listView.itemList.forms - you can substitute listView with singleView any time of course if you have a form in singleView and not in listView) properties are available which configure the default value and html code for submit buttons.

The .forms container is available directly on the listView/singleView TS level but also in it's sub-property itemList - similar to cObjects. This is cause a form-item (an input box for example) can get rendered bound to the listing itself (for contact/delivery address data formulars for example) and to a single element (for an "ordering amount" input field i.e.)

Property

Data type

Description

Default

submitButton

string / stdWrap

Contains the full HTML of the submit button

<input type="submit" value="Save" name=""doSave />

++tablename++.defVals.++fieldname++

string / stdWrap

Using this value you can predefine the values for fields in the virtual order table. ++tablename++ is the complete tablename of a virtual order table. ++fieldname++ is only the alias you set for a field.

recordPid

integer /

stdWrap

This value specified in which pid the records will get created when it hasn't been otherwise specified by the above .defVals. container/key

plugin.tx_kbshop_pi1.listView.forms / plugin.tx_kbshop_pi1.listView.itemList.forms / plugin.tx_kbshop_pi1.singleView.forms / plugin.tx_kbshop_pi1.singleView.itemList.forms; same for pi2

The "listView" and "singleView" containers

Those containers are the most important for generating the listing. They contain the definition for how each view is rendered. Also with all other occurences listView and singleView are identical.

Property

Data type

Description

Default

noCache

boolean

When set the no_cache flag will be set during rendering of the paeg which will cause the page to not get cached.

0

cObjects.++cobjname++

cObject

++cobjname++ must be the name of a TS cObject which will get inserted in the FE as a COBJ_LISTING_ cObject marker.

fieldConfig.rte.parseFunc_RTE

-> parse func

Contains the parse func which gets used to when rendering a RTE field by default (no stdWrap used). When this is not set there is a fallback to:

lib.parseFunc_RTE

and when this is also not set to:

tt_content.text.20.parseFunc

fieldConfig.date

stdWrap

This property defines how date fields get renderd by default when no special stdWrap is specified

%Y-%m-%d, %H:%M:%S

listViewLink.extra.++linknum++

-> typolink

Using this TS array and the ###LINK_listView_HREF_++linknum++### marker you can define custom links to a listing of your records. This is especially nice if you want to define links setting specific values which change layout or filter for specific predefined criterias.

The page number which shall get displayed is contained in the register linkPageNumber.

singleViewLink.extra.++linknum++

-> typolink

The same as the above option but for links to singleView displays. The itemUid of the value to link to is contained in the register linkViewUid - also the page is available in linkPageNumber like in the above option.

listViewLink.page

integer / stdWrap

This property defines the page-uid which shall get used for links to a listing.

current page

singleViewLink.page

integer / stdWrap

This property defines the page-uid which shall get used for links to a detail view.

current page

forms

container

See above section "The forms container" (lower table)

itemList

container

See section "The itemList sub-container" below.

noCache

Integer

Sets rendering to noCache

plugin.tx_kbshop_pi1.listView / plugin.tx_kbshop_pi1.singleView / plugin.tx_kbshop_pi2.listView / plugin.tx_kbshop_pi2.singleView

The "itemList" sub-container

The above properties are all "bound" to the listing itself but rather not to a single record which gets listed. This means that the ->data array of the cObject instance rendering all the stdWraps and TS cObjects contains the row from the tt_content FE-plugin inserted into the page. When you want to render cObjects which show distinct values for each rendered record you will have to use the itemList sub-container of listView and/or singleView.

These are the properties of the itemList subcontainer:

Property

Data type

Description

Default

forms

container

See above section "The forms container" (lower table)

cObjects.++cobjname++

cObject

++cobjname++ must be the name of a TS cObject which will get inserted in the FE as a COBJ_ITEM_ cObject marker.

fields.++fieldname++

string / stdWrap

This keys contains stdWrap properties for each field (not adding the prefix set during installation). When no stdWrap properties have been given to a field some default processing will occur. When you define stdWrap properties for an RTE field you have to pass it through lib.parseFunc_RTE yourself.

++sectionname++.cObjects.++cobjname++

cObject

cObjects rendered for each single section-element record. (With their data row in the cObjects ->data array).

++sectionname++ has to be the name (alias) of the container property forming the section.

This is the same as above property "cObject" in this table but for the sub-records assigned in a section to the currently rendered record.

++sectionname++.fields.++fieldname++

string / stdWrap

This key contains stdWrap properties for each field of the section-element records in the currently rendered record.

++sectionname++ has to be the name (alias) of the container property forming the section.

This is the same as above property "fields" (in this table) but for the sub-records assigned in a section to the currently rendered record.

overlay.table

overlay.uid

overlay.section

overlay.marker

overlay.select

overlays

integer

stdWrap

boolean

string

selectConf

Array

overlay.table gives the uid of a category record (which must be a root-category aka. table) from which the record specified by overlay.uid will get "overlayed" over the current ->data array of the rendering cObject and the main rendering method will get called again (which will result in all markers for fields of the overlayed table getting replaced by the appropriate values).

This is useful for overlaying the product table over the virtual ordering table while listing the ordering basket: You list the items in the ordering basket and over each ordered item you overlay the record for this product :)

When you set overlay.table to the name of an T3 table instead of the category uid of an shop-table you can overlay any table – like fe_users or similar

By setting the suboption “section” a sub-section get's created for the overlay – meaning you have to define a ###PART_ and ###LIST_ subpart. Only inside those markers the fields will get replaced.

Using the suboption “marker” you can define the sectioname of the PART/LIST/FIELD_VALUE markers. I.e. if you set:

overlay.marker = prodcuts

overlay.section = 1

You have create a HTML template similar to:

<!-- ###PART_products### begin -->

<!-- ###LIST_products### begin -->

###FIELD_VALUE_products_title###

<!-- ###LIST_products### end -->

<!-- ###PART_products### end -->

overlays

container

Inside this container you define sub-configurations referenced by numbers – the allowed directives of such a sub-configuration are the above options for an overlay.

I.e:

overlays {

  10 = 1

  10 {

    table = fe_users

    uid.field = kbs_owner

    marker = siteuser

  }

}

hooks

Array

Example:

hooks.kbs_bilder=1

hooks.kbs_bilder < plugin.tx_rgsmoothgallery_pi1

hooks.kbs_bilder {

class=tx_rgsmoothgallery_kbshop

path=uploads/tx_kbshop

big {

file.maxW = 300

file.maxH = 300

}

height = 300

width = 300

showThumbs= 1

thumbOpacity = 0.8

arrows = 1

hideInfoPane = 0

duration = 7500

lightbox=1

}

none

plugin.tx_kbshop_pi1.listView.itemList / plugin.tx_kbshop_pi1.singleView.itemList / plugin.tx_kbshop_pi2.listView.itemList / plugin.tx_kbshop_pi2.singleView.itemList