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 RealUrl (en)

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:dirk
Changed:2015-05-28T17:05:20
Classification:browser_tut_realurl_en
Description:Configure RealURL. Tutorial for the Browser – TYPO3 without PHP.
Keywords:browser, typo3 without php, realurl
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 RealUrl (en) (extkey: browser_tut_realurl_en) img-3

Browser Tutorial RealUrl (en)

Browser – TYPO3 without PHP

Configure RealURL. Tutorial for the Browser – TYPO3 without PHP.

img-4

Version: 7.1.3, 2015-05-28

Extension Key: browser_tut_realurl_en

Language: en

Keywords: browser, typo3 without php, realurl

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

Screen Shots

Frame4

A URL looks like this without Real URL:

http://die-netzmacher.de/index.php?id=2926&tx_browser_pi1[showUid]=1 4319&cHash=a81cae5084

Frame4

A URL looks like this with Real URL:

http://die-netzmacher.de/nachrichten/title/ab-heute-die-netzmacher/

Introduction

What does the Tutorial do?

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

It is

a step-by-step introduction for the configuration of the Real URL functionality

only.

If you are interested in other issues, please note the section "Further Informations" below.

What does the Browser do with Real URL?

  • Searching in displayed and in non displayed columns.

  • Searching for words and phrases. Example:

    • Sword: "My Phrase" Word another word
    • Will search for "My Phrase" or "Word" or "another" or "word".
  • img-6 Illustration 3: Tutorial in PDF format

    The search is case insensitive.

  • The search is configurable:

    • You can search in every column of every table. It doesn't matter, if table or filed are displayed in the current view.
    • You can configure the search form.
    • You can configure the colors of the result items.

Beforehand

Configuring Real URL in general

You can configure the Browser for Real URL with the common Real URL configuration.

Real URL Manual

You find the whole documentation for Real URL on

http://typo3.org/extensions/repository/view/realurl/current/

Tutorial

Configuration for all pages in general

If you have a small website with a small RealUrl configuration, you should take the easy way: Configuring RealURL for all pages of your site.

Browser Sample

You find a Browser sample at:

typo3conf/ext/browser/Resources/Private/Extensions/RealURL/realurl_co nf.php

realurl_conf.php

You find the TypoScript code in res/01_realurl_conf.php.

<?php


//

// Snippet for tt_news

// It is for the file localconf.php or realurl_conf.php

// If you have your own table like tx_mytable, please configure

// ...

// 'lookUpTable' => array(

// 'table' => 'tx_mytable',

// ...

$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(

'_DEFAULT' => array(

'postVarSets' => array(

'_DEFAULT' => array(

'title' => array(

array(

'GETvar' => 'tx_browser_pi1[showUid]' ,

'lookUpTable' => array(

'table' => 'tt_news', // <- Your table

'id_field' => 'uid',

'alias_field' => 'title',

'addWhereClause' => ' AND NOT deleted AND NOT hidden',

'useUniqueCache' => 1,

'useUniqueCache_conf' => array(

'strtolower' => 1,

'spaceCharacter' => '-',

),

),

),

),

'az' => array(

array(

'GETvar' => 'tx_browser_pi1[azTab]' ,

),

),

'mode' => array(

array(

'GETvar' => 'tx_browser_pi1[mode]' ,

),

array(

'GETvar' => 'tx_browser_pi1[pointer]' ,

),

),

'sort' => array(

array(

'GETvar' => 'tx_browser_pi1[sort]' ,

),

),

'sword' => array(

array(

'GETvar' => 'tx_browser_pi1[sword]' ,

),

),

),

),

),

)

?>

Please copy the code in you localconf.php or in your realurl_conf.php.

Comment

Every parameter of the Browser Tutorial RealUrl (en) will be renamed as a word of your choice. Example with the the code above:

' az ' => array(

array(

'GETvar' => ' tx_browser_pi1[azTab] ' ,

),

The parameter "tx_browser_pi1[azTab]" (line 37) will be renamed as brwAZ (line 35). If you like another name i.e. "myAz", please change the value in line 35 to "myAz".

The uid of the record will be renamed as the title of the record. Example with the code above:

' title ' => array(

array(

'GETvar' => ' tx_browser_pi1[showUid] ' ,

'lookUpTable' => array(

'table' => 'tt_news', // <- Your table

'id_field' => 'uid',

'alias_field' => 'title',

'addWhereClause' => ' AND NOT deleted AND NOT hidden',

'useUniqueCache' => 1,

'useUniqueCache_conf' => array(

'strtolower' => 1,

'spaceCharacter' => '-',

),

),

),

),

The code should be easy to understand.

We have an array lookUpTable in line 22. This effects that the extension Real URL will look up in the defined table a value for the given uid.

In the case above, Real URL will search the record by its "uid" (line 24) in the table "tt_news" (line 23) and will renamed the uid as the value from the "title" (line 25).

If you want to know more about configuration possibilities, please take a look in the manual of the extension Real URL.

Configure pages differently

We had a contract to develop the Browser for displaying records from the database Virtual Civil Services (extkey: civserv). It is a database especially for public services. It displays services, agencies and forms among other things.

If you have a detail view of a service like a dog license fee there is a link to the appropriate agency like the city finance department. Real URL generates a proper link to that agency if you are using the fixedPostVars array.

The fixedPostVars array enables a real URL configuration depending on the current page.

realurl_conf.php

You find the TypoScript code in res/02_realurl_conf.php.

In line 46 is a page id. Please replace it with your page id.

<?php

...

$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array

(

...

);


//

// Real URL onfiguration for civserv depending on the current page

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['fixedPostVars'] = array

(

'tx_civserv_service' => array

(

array

(

'GETvar' => 'tx_browser_pi1[azTab]',

'valueDefault' => 'A-Z',

),

array

(

'GETvar' => 'tx_browser_pi1[showUid]',

'lookUpTable' => array

(

'table' => 'tx_civserv_service',

'id_field' => 'uid',

'alias_field' => 'sv_name',

'addWhereClause' => ' AND NOT deleted AND NOT hidden',

'useUniqueCache' => 1,

'useUniqueCache_conf' => array

(

'strtolower' => 1,

'spaceCharacter' => '-',

),

)

),

array

(

'GETvar' => 'tx_browser_pi1[pointer]',

),

),

' 1512 ' => 'tx_civserv_service',

);

...

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets'] = array

(

...

);

?>

Comment

You see the completely code in res/02_realurl_conf.php

The code has three parts:

Default real URL configuration

Real URL configuration for civserv depending on the current page

Real URL configuration for all pages

Default real URL configuration

Here you configure the general real URL configuration

Real URL configuration for civserv depending on the current page

Here you configure the real URL configuration only for the configured page (see line 46)

Further Information

See the Tutorial "Page Browser and A-Z-Browser". The A-Z-Browser has a paragraph with real URL.

You find it in the Tutorial Basics.

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.1.3 Feature * #i0176: RealURL sample. See: typo3conf/ext/brows er/Resources/Private/Extensions/RealURL/realurl_conf.php Update * #i0002: For Browser 7.1.2

3.0.1 Initial release

Illustration Index

Illustration 1: URL without Real URL 3

Illustration 2: URL without Real URL 3

Illustration 3: Tutorial in PDF format 4

Alphabetical Index

14