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.

Groups for tt_address

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Ingo Renner
Changed:2006-05-08T17:07:00
Author:Ingo Renner
Email:typo3@ingo-renner.com
Info 3:
Info 4:

Groups for tt_address

Extension Key: addressgroups

Copyright 2000-2002, Ingo Renner, <typo3@ingo-renner.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

Groups for tt_address 1

Introduction 1

What does it do? 1

Screenshots 1

Users manual 2

Creating a Group 2

Assigning groups to an address record 3

Creating a Plugin Content Element and adding addresses to it 3

Adminstration 4

Configuration 4

Reference 5

Known problems 6

To-Do list 6

Changelog 6

Introduction

What does it do?

In the first place this extension adds a new field to tt_address records. This field is used to assign groups to the address record. The groups can be organized in a hierarchy with parent and sub groups.

The extension also comes with a plugin where either single tt_address records can get selected or as an alternative the selection can be made through groups. That group selection can have AND or OR combinations of groups. Additionally the plugin offers to select a template to display the address records.

In both, the tt_address records and the plugin the groups can be selected through a tree view like that known from DAM or tt_news.

The advantage of using address records through the plugin instead of inserting them with the “Insert record” content element especially pays of in larger sites with a lot of address records, so you can assign the groups to addresses and on a page you make a selection by groups, thus if a person changes its function you don't need to search the whole site where that person is shown. Instead you just assign his old group to a new person and it is exchanged over the whole site.

Screenshots

This is the plugin with the tree selector.

img-1

Users manual

Creating a Group

At first you need to create some groups for your address records. To do this navigate to a sysfolder and switch to the list view. Click “Create new record” at the bottom, now click Address Group.

img-2 In that form the title is the only required field, if you have created some groups already you will see them in the tree view and can select one as the parent group for the group you are about to create. At the bottom you can add a small note or description to the group.

Assigning groups to an address record

Adding groups to an address is as easy as adding a parent group to another group. Open the address record you want to assign a group to or create a new address record, go to the bottom of the form and add one or more groups from the right box by clicking on the group.

img-3 When adding groups to an address there's one point to be aware of: The top most group you assign to an address can be put out in the front end later, so you might want to choose that carefully or switch positions of the selected groups.

Creating a Plugin Content Element and adding addresses to it

Go to the page view and navigate to the page where you want to insert one or more addresses. Create a new content element and in the “new content element wizard” scroll down to the plugins section and select “Address Selection”

img-4 Now on the first tab [1] you can add address records to the plugin, the second tab [2] is for selecting a template for how the address should look like, this needs to be configured by your administrator. If there're no templates on the second tab, just save the content element once and after saving it they should apear.

img-5 In the Single addresses field [3] you can select addresses by using the known element browser. Even if the addresses selected here would be selected via groups, too they do not appear twice.

In the groups field [4] you can select groups from the tree view. These groups get combined either by AND or by OR [5]. That means you can select addresses which are in all of the given groups (AND) or they are required to be only in one of the given groups (OR).

The starting point does not necessarily need to be set. The extension can be configured to work with a default setting which needs to be adjusted by your administrator. If you set a startingpoint here, it will override that default setting that might be set. The recursive field [7] set how deep in the page tree beginning from the startingpoint the system should look for addresses with the given groups.

Adminstration

There's not much to say about administration here, just install the extension. After installation you need to configure the extension. For that, please consult the next section.

Configuration

When starting to configure the extension you should create a separate TS extension template for it where you do all the configuration for this extension. That extension template can then get included in the root template. In the extension template add the static TS configuration, otherwise it wont work!

img-6

Reference

templatePath

Property

templatePath

Data type

string

Description

Defines the path where the templates are located. Put templates in that folder and they will be listed automatically in the plugin. You can also add a small graphic showing how the address will be displayed. That graphic need to have the same name as the template but must be a gif. This basically works like the template selector from MTB2.

Default

fileadmin/templates/

defaultTemplateFileName

Property

defaultTemplateFileName

Data type

string

Description

Defines the default template file.

Default

addressgroups_default.htm

pidList

Property

pidList

Data type

int

Description

A comma separated list of integers representing page ids where to get the address records from

Default

0

recursive

Property

recursive

Data type

int

Description

Defines how many levels to search for tt_address records from the given pages in pidList.

Default

0

sortByColumn

Property

sortByColumn

Data type

string

Description

Defines by which tt_address column you want to sort, if an invalid column is given it's set to 'name'

Valid columns for sorting:

uid, pid, tstamp, name, title, email, phone, mobile, www, address, company, ciy, zip, country, image, fax, description

Default

name

sortOrder

Property

sortOrder

Data type

string

Description

Defines the sorting order, DESC for descending and ASC for ascending. Any other (invalid) value is set to ASC.

Default

ASC

templates.[TEMPLATENAME]

Property

templates.[TEMPLATENAME]

Data type

stdWrap

Description

The configurations for the different templates goes here. Let's have a look at an example:

Let's assume you have three different html templates:

* template_1.htm

* other_template.htm

* different_template.htm

TEMPLATENAME is the file name without the extension. Now you can configure each of these templates:

Example:

plugin.tx_addressgroups_pi1 {
  templates.template_1 {
    email.wrap = E-Mail: |<br />
    email.required = 1
    ...
  }

  templates.other_template {
    ...
  }

  templates.different_template {
    ...
  }
}

each standard tt_address field can be configured with stdWrap properties. Like wrap and required which will most propably be the most important and most used ones.

Here's the list of default field you can – but not need to – use inside each template configuration:

name, title, email, phone, mobile, www,, address, company, city, zip, country, image, fax, description, mainGroup

You can control max width and hight of an image with image.file.maxW and image.file.maxH

An example template can be found in the res folder in the extension.

Default

[tsref:plugin.tx_addressgroups_pi1]

Known problems

None so far

To-Do list

Nothing yet, please send me your ideas for improvements.

Changelog

v1.0.0 initial release

v1.1.0 rendering of images and recursive selection via TS added

v1.2.0 added sorting, sorting can happen by any default tt_address column and descending or ascending. Added full stdWrap support for the fields you can use in templates

v1.3.0 added localization support

img-7 Groups for tt_address - 6