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.

Browser Tutorial Labeling (en)

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:dirk
Changed:2015-04-08T17:31:11
Classification:browser_tut_labeling_en
Description:This is the Tutorial Labeling for the Extension Browser – TYPO3 without PHP.
Keywords:browser, typo3 without php, label, labeling
Author:Dirk Wildt, Die Netzmacher
Email:http://wildt.at.die-netzmacher.de
Website:http://die-netzmacher.de
Language:en

img-1 img-2 Browser Tutorial Labeling (en) (extkey: browser_tut_labeling_en) img-3

Browser Tutorial Labeling (en)

Browser - TYPO3 without PHP

This is the Tutorial Labeling for the Extension Browser – TYPO3 without PHP.

img-4

Version: 7.0.6, 2015-04-08

Extension Key: browser_tut_labeling_en

Language: en

Keywords: browser, typo3 without php, label, labeling

Copyright 2009-2015, Dirk Wildt, Die Netzmacher, <http://wildt.at.die- netzmacher.de>

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

Introduction

What does it do?

This is a tutorial for the extension Browser (extkey: browser).

It is

a step-by-step introduction for Labeling

only.

Further Information

This tutorial in PDF format

You find this tutorial as a PDF file at

Browser Manual

Manual: The Browser has it's own manual (with the reference of course).

Tutorial: Labeling and Field Properties

Intention

The tutorial describes the steps for labeling the field names and the names of the registers in the frontend.

The Browser has an auto labeling: it takes the values from the TYPO3 TCA. And the Browser detects the properties from fields, which are registered in the TCA. It can recognize titles, images, documents and time stamps.

Sometimes you want to label names by your own or want another process for an image than the Browser.

To change labels or properties should be really simple.

Step 1: The Browser Support for Labeling

Intention

We want to understand the labeling support.

TypoScript

plugin.tx_browser_pi1 {

views {

list {

1 {

select = tt_news.title, tt_news_cat.title

}

}

}

}

Result

Frame38

Exercise

We activate the logging mode

Labeling Support

You need the extension devlog, otherwise you won't get any message in your log report.

Please

  • open the extension manager,
  • choose the Browser Tutorial Labeling (en) extension and
  • choose "Labeling Support" for logging.

Frame38

Reload the page "tutorial" in the frontend.

Log Report

Open the log report:

  • Choose module "Tools" > "Developer Log" (you need the extension devlog).
  • Search for the Word "Label:".
  • You should find a line like this:

[INFO/LOCALLANG] Label is: Title:

  • If it isn't possible to find this line, please clear the cache of the page "tutorial" and reload the page in the frontend again.
  • Sometimes other extensions reports to devlog. Switch off that reporting.

Frame38

We are interested in the three lines with the prefix [INFO/... and the one line with the prefix [HELP/...:

[INFO/LOCALLANG] Label for tt_news.title: try the TCA.

[INFO/LOCALLANG] Init a language object.

[INFO/LOCALLANG] Label is: Title:

[HELP/LOCALLANG] If you want another label, please configure _LOCAL_LANG.default.tt_news_title

The meaning of the lines should be clear.

The HELP line is the important line. It helps to configure TypoScript without reading any manual.

This is DRS img-6 - the Development Reporting System. It is a new idea of supporting the configuration of TypoScript with a minimum of costs!

See the next step.

Step 2: Own Labels instead of TCA values

Intention

We want to change the label for the title of tt_news_category from the TCA value "Title:" to "Category:".

TypoScript

You find the whole TypoScript code for this step inres/tutorial_01/step_02.txt.

Exercise

We activate the DRS logging mode

Labeling Support (see step 1 of this Tutorial).

  • Reload the page "tutorial" in your frontend.
  • Choose in the backend module "Tools" > "Developer Log" (you need the extension devlog).
  • Search for the Word "Title:".
  • You should find a line like this:

[INFO/LOCALLANG] Label is: Title:

There should be lines like this above and below:

[INFO/LOCALLANG] Label for tt_news_cat.title: try the TCA.

[INFO/LOCALLANG] Init a language object.

[INFO/LOCALLANG] Label is: Title:

[HELP/LOCALLANG] If you want another label, please configure _LOCAL_LANG.default.tt_news_cat_title

We are interested in the line with the HELP message.

We add at the end of our TypoScript a _LOCAL_LANG array and a value for the tt_news_category.title:

plugin.tx_browser_pi1 {

_LOCAL_LANG {

default {

tt_news_cat_title = Category:

}

}

}

Result

Frame38

The label for the category title is now "Category:" instead of "Title:".

Step 3: Labeling "unknown" fields

Intention

We want to label "unknown" fields. "Unknown" fields are fields, which aren't known in the TCA array.

This are the labels for the registers / views and i. e. for the TYPO3 field tstamp.

TypoScript

You find the whole TypoScript code for this step inres/tutorial_01/step_03.txt.

We have an example with two list views:

plugin.tx_browser_pi1 {

views {

list {

1 {

select = tt_news.title, tt_news_cat.title

}

2 {

select = tt_news.title, tt_news.datetime

}

}

}

}

Result

Frame38

Exercise

We activate the logging mode

Labeling Support (see step 1 of this Tutorial).

  • Reload the page "tutorial" in the frontend.
  • Choose in the backend module"Tools" the "Developer Log" (you need the extension devlog).

In this step we are interested only in lines with the yellow warning icon and the white help icon:

[WARN/LOCALLANG] list_mode_1 hasn't any value in _LOCAL_LANG

[HELP/LOCALLANG] Please configure _LOCAL_LANG.default.list_mode_1.

Frame38

The logging reports the following:

  • Every field is listed with a warning icon, which hasn't any value in the TCA or the _LOCAL_LANG array.
  • We didn't named the registers. We got messages with a warning.

Please add the following TypoScript to the end of the current code:

plugin.tx_browser_pi1 {

_LOCAL_LANG {

default {

list_mode_1 = Title with Category

list_mode_2 = Title with Date

}

}

}

Result

Frame38

Step 4: Labeling conform with the guidelines of the WAI

Intention

The Browser Tutorial Labeling (en) is conform with the guidelinesof the Web Accessibility Initiative (WAI). The WAI is very important for handicapped persons and for search engines too. It is important for search engines, because they can't understand any image and they can't understand any context.

The Browser Tutorial Labeling (en) uses the HTML tag table for lists. One guideline of the WAI is, to use summaries and captions in tables.

We didn't maintain this properties and tags. The DRS "Labeling Support" will have warning messages.

TypoScript

You find the whole TypoScript code for this step inres/tutorial_01/step_04.txt.

We have an example with two list views:

plugin.tx_browser_pi1 {

views {

list {

1 {

select = tt_news.title, tt_news_cat.title

}

2 {

select = tt_news.title, tt_news.datetime

}

}

}

_LOCAL_LANG {

default {

list_mode_1 = Title with Category

list_mode_2 = Title with Date

}

}

}

Exercise

We activate the logging mode

Labeling Support (see step 1 of this Tutorial).

  • Reload your page "tutorial" in the frontend.
  • Choose in the backend module"Tools" the "Developer Log" (you need the extension devlog).

In this step we are interested only in lines with the yellow warning icon and lines with the Word "WAI":

[WARN/LOCALLANG] list_mode_1_summary hasn't any value in _LOCAL_LANG

[INFO/LOCALLANG] If you use a table it won't have any summary.

[INFO/LOCALLANG] This wouldn't according to the guidelines of the Web Accessibility Initiative (WAI)

[HELP/LOCALLANG] Please configure _LOCAL_LANG.default.list_mode_1_summary.

...

[WARN/LOCALLANG] list_mode_1_caption hasn't any value in _LOCAL_LANG

Frame38

Please add the following TypoScript to the end of the current code:

plugin.tx_browser_pi1 {

_LOCAL_LANG {

default {

list_mode_1_summary = This is a list with all news and their categories

list_mode_1_caption = News with categories

}

}

}

Result

Frame38 Frame38

Step 5: Field Properties from the TCA

TypoScript

The field properties have a TypoScript array.

plugin.tx_browser_pi1 {

autoconfig {

autoDiscover {

...

}

}

}

The elements of the array should be self-explanatory. See the illustration above.

Frame38

DRS - Development Reporting System

Switch on the DRS - Development Reporting System. Take one of these logging modes:

  • Auto Discover development
  • All

You should get helpful messages, if you want to change the configuration for field properties like this:

[INFO/SQL] TCA 'tt_news.category.config.foreign_table: 'tt_news_cat'

See the illustration below.

Frame38

Reference

See the section Reference / Localization in the Browsers manual in

Helpful suggestions

((generated))

Forum

If you have helpful suggestions, feel free to publish any question, bug or code snippet on

http://typo3-browser-forum.de/

Posts are welcome in English and German.

New Features and Bug Reports

You are welcome to post any question, bug or code snippet on TYPO3 forge.Here you find feature announcements and bug reports.See

http://forge.typo3.org/projects/show/extension-browser

Change Log

7.0.6 Update Browser 6.x/7.x, TYPO3 6.x

3.0.1 Publishing Initial release

Illustration Index

Illustration 1: The title of a news and the title of a category have the same label in the TCA. 4

Illustration 2: DRS - Development Reporting System with "Labeling Support" 5

Illustration 3: The developer log with "Labeling Support" messages. 5

Illustration 4: The own label for the category 6

Illustration 5: List view with two views - [1] and [2]. 7

Illustration 6: The developer log 8

Illustration 7: List view with the labeled names for every view. 8

Illustration 8: The developer log with messages in context with the WAI 10

Illustration 9: The frontend with the table tag caption.10

Illustration 10: The backend with the table property summary and the table tag caption. 10

Illustration 11: The TypoScript array for auto configuring fields. 11

Illustration 12: The messages for auto configuring fields in the DRS. 11

Alphabetical Index

16