.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ===================================== Browser Tutorial Several Plugins (en) ===================================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed: 2010-10-04T19:18:09 :Classification: browser_tut_severalplugins_en :Description: Tutorial Several Plugins for the Browser - the Frontend Engine :Keywords: forAdmins, forDevelopers, forBeginners, forAdvanced, browser, tutorial, frontend-engine, frontend, engine, plugins, multiple, several :Author: Dirk Wildt, Die Netzmacher :Email: wildt.at.die-netzmacher.de :Website: http://die-netzmacher.de :Language: en |img-1| |img-2| extKey: browser\_tut\_severalplugins\_en |img-3| .. _Browser-Tutorial-Several-Plugins-en: Browser Tutorial Several Plugins (en) ===================================== |img-4| Version: 3.4.4., 2010-10-04 - Version is corresponding with the version of the Browser. Extension Key: browser\_tut\_severalplugins\_en - Tutorial for the extension Browser (extkey: browser) Language: en Keywords: forAdmins, forDevelopers, forBeginners, forAdvanced, browser, tutorial, frontend-engine, frontend, engine, plugins, multiple, several Copyright 2009-2010, Dirk Wildt, Die Netzmacher, 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 .. _Table-of-Contents: Table of Contents ----------------- `Browser Tutorial Several Plugins (en) 1 <#__RefHeading__10758_1317263085>`_ `Screenshots 3 <#__RefHeading__10760_1317263085>`_ `Introduction 4 <#__RefHeading__10762_1317263085>`_ `What does the Tutorial do? 4 <#__RefHeading__10764_1317263085>`_ `Further Information 4 <#__RefHeading__10766_1317263085>`_ `This tutorial in PDF format 4 <#__RefHeading__10768_1317263085>`_ `Browser Manual and Browser Tutorial Basics 4 <#__RefHeading__10770_1317263085>`_ `The three Plugins Example 5 <#__RefHeading__10772_1317263085>`_ `Pages and Sysfolders 5 <#__RefHeading__10774_1317263085>`_ `TypoScript 6 <#__RefHeading__10776_1317263085>`_ `Configuring the Plugins 6 <#__RefHeading__10778_1317263085>`_ `Startingpoints 6 <#__RefHeading__10780_1317263085>`_ `Select the Views 7 <#__RefHeading__10782_1317263085>`_ `Enable the Displaying of Backend Users 7 <#__RefHeading__10784_1317263085>`_ `List Title 7 <#__RefHeading__10786_1317263085>`_ `Display empty List at Start 8 <#__RefHeading__10788_1317263085>`_ `Result in the Frontend 8 <#__RefHeading__10790_1317263085>`_ `The one Plugin example with three lists 9 <#__RefHeading__1223_389063724>`_ `Manage all three views with one Plugin 9 <#__RefHeading__1225_389063724>`_ `Configure the Plugin 9 <#__RefHeading__1227_389063724>`_ `TypoScript 10 <#__RefHeading__1229_389063724>`_ `Frontend 10 <#__RefHeading__1231_389063724>`_ `With the latest three News 11 <#__RefHeading__10792_1317263085>`_ `TypoScript 11 <#__RefHeading__10794_1317263085>`_ `Plugin 11 <#__RefHeading__10796_1317263085>`_ `Result in the Frontend 12 <#__RefHeading__10798_1317263085>`_ `Templating 12 <#__RefHeading__10800_1317263085>`_ `Single Views 13 <#__RefHeading__10802_1317263085>`_ `Browser Manual 13 <#__RefHeading__10804_1317263085>`_ `Browser Tutorial Basics 13 <#__RefHeading__10806_1317263085>`_ `No Cache 14 <#__RefHeading__10808_1317263085>`_ `Case story 14 <#__RefHeading__9924_87953556>`_ `Tutorial 14 <#__RefHeading__9926_87953556>`_ `Plugin 14 <#__RefHeading__9928_87953556>`_ `Include Static Template 14 <#__RefHeading__9930_87953556>`_ `TypoScript Snippet 15 <#__RefHeading__9932_87953556>`_ `RealUrl 16 <#__RefHeading__9934_87953556>`_ `Configurable tx\_browser\_pi1[showUid] 16 <#__RefHeading__10810_1317263085>`_ `Example 16 <#__RefHeading__10812_1317263085>`_ `TypoScript 16 <#__RefHeading__10814_1317263085>`_ `RealURL configuration snippet 16 <#__RefHeading__10816_1317263085>`_ `Reference 18 <#__RefHeading__10818_1317263085>`_ `Helpful suggestions 19 <#__RefHeading__10820_1317263085>`_ `To-Do List 20 <#__RefHeading__10822_1317263085>`_ `Change Log 21 <#__RefHeading__10824_1317263085>`_ `Illustration Index 22 <#__RefHeading__10826_1317263085>`_ .. _Screenshots: Screenshots ----------- |img-5| |img-5| |img-6| Illustration 3: Tutorial in PDF format Introduction What does the Tutorial do? ^^^^^^^^^^^^^^^^^^^^^^^^^^ This is a tutorial for the extension Browser (extkey: browser). It is a step-by-step introduction for using the Browser plugin several times on the same page only. If you are interested in other issues, please note the section "Further Informations" below. .. _Further-Information: Further Information ^^^^^^^^^^^^^^^^^^^ .. _This-tutorial-in-PDF-format: This tutorial in PDF format """"""""""""""""""""""""""" You find this manual as PDF file at doc/manual.pdf `http://typo3.org/extensions/repository/view/\_tut\_multiplugin\_en/cu rrent/info/?tx\_terfe\_pi1%5BdownloadFile%5D=doc%252Fmanual.pdf `_ .. _Browser-Manual-and-Browser-Tutorial-Basics: Browser Manual and Browser Tutorial Basics """""""""""""""""""""""""""""""""""""""""" Manual: The Browser has it's own manual (with the reference of course). - HTML `http://typo3.org/documentation/document-library/extension- manuals/browser/current/ `_ - PDF: `http://typo3.org/extensions/repository/view/browser/current/info /?tx\_terfe\_pi1%5BdownloadFile%5D=doc%252Fmanual.pdf `_ Tutorial Basics: A lot of step-by-step introductions. - HTML: `http://typo3.org/documentation/document-library/extension- manuals/browser\_tut\_basics\_en/current/ `_ - PDF: `http://typo3.org/extensions/repository/view/browser\_tut\_basics \_en/current/info/?tx\_terfe\_pi1%5BdownloadFile%5D=doc%252Fmanual.pdf `_ .. _The-three-Plugins-Example: The three Plugins Example ------------------------- We will display three lists in the frontend: - Frontend users - Backend users - News .. _Pages-and-Sysfolders: Pages and Sysfolders ^^^^^^^^^^^^^^^^^^^^ You need - a page for the output - we called it "tutorial", - a sysfolder with the frontend users and - a sysfolder with the news like in the illustration below: |img-5| Add to the page "tutorial" the plugin Browser three times. Call the plugins: - view 1 - view 2 and - view 3 Set the header type to "hidden". .. _TypoScript: TypoScript ^^^^^^^^^^ Add to your page "tutorial" a template. Include the static template from the Browser. |img-5| Add in the tab [General] in the field [setup] this TypoScript snippet: plugin.tx\_browser\_pi1 { views { list { 1 { name = Frontend User with their groups select = fe\_users.username, fe\_groups.title } 2 { name = Backend User with their groups select = be\_users.username, be\_groups.title } 3 { name = News with their categories select = tt\_news.title, tt\_news\_cat.title } } } } The snippt should be easy to understand. .. _Configuring-the-Plugins: Configuring the Plugins ^^^^^^^^^^^^^^^^^^^^^^^ .. _Startingpoints: Startingpoints """""""""""""" |img-5| Please add the startingpoints. The startingpoint of the plugin "View 1" is the sysfolder fe\_user. The startingpoint of the plugin "View 3" is the sysfolder news. .. _Select-the-Views: Select the Views """""""""""""""" |img-5| Please select in each Browser plugin the devider [Plugin] the devider [General]. Set the select box [views] to "configured". Add to the field [Views: Enabled list views, which are handled by the plugin. ...the list, you want to display. .. _Enable-the-Displaying-of-Backend-Users: Enable the Displaying of Backend Users """""""""""""""""""""""""""""""""""""" To display backend users is a special case, because they aren't stored in any sysfolder. All be\_users have the pid 0, the pid of the TYPO3 root. Select the plugin "View 2". Select the tab [General] of the plugin. Select in the select box [Configure Relations] the value "Configured" Field [Records without Pid]: Please enable "Display records of the root level too". .. _List-Title: List Title """""""""" Please select the second tab [Lists] of each plugin. Set the field [Title]: View 1: = Frontend Users View 2: = Backend Users View 3: = News .. _Display-empty-List-at-Start: Display empty List at Start """"""""""""""""""""""""""" Please select the second tab [Lists] of each plugin. Select in the select box [Display] the value "Adjusted". Enable in each view the option [Empty List at Start]. .. _Result-in-the-Frontend: Result in the Frontend """""""""""""""""""""" |img-5| .. _The-one-Plugin-example-with-three-lists: The one Plugin example with three lists --------------------------------------- .. _Manage-all-three-views-with-one-Plugin: Manage all three views with one Plugin ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You can manage all three views with one plugin only. These are the steps: - |img-7| Illustration 9: One plugin with three views Take the first plugin from this tutorial above. - Add to the plugin the other two list views. - Enable records from rootlevel. - Maintain the startingpoint. - Enable Labelling. .. _Configure-the-Plugin: Configure the Plugin """""""""""""""""""" Please select in each Browser plugin the devider [Plugin] the devider [General]. Set the select box [views] to "configured". Add to the field [Views: Enabled list views, which are handled by the plugin. ...the list, you want to display. Enable the Relations Configuration.Select [Configured] Enable to display records of the root level (we need it for the records of the backend users). Add to the startingpoint the folder with your news. .. _TypoScript: TypoScript """""""""" Add to your TypoScript values for labelling. The values list\_mode\_x will label the devider of the list view with the element number x in the TypoScript. plugin.tx\_browser\_pi1 { views { list { 1 { name = Frontend User with their groups select = fe\_users.username, fe\_groups.title } 2 { name = Backend User with their groups select = be\_users.username, be\_groups.title } 3 { name = News with their categories select = tt\_news.title, tt\_news\_cat.title } } } \_LOCAL\_LANG.default { list\_mode\_1 = fe\_user list\_mode\_2 = be\_user list\_mode\_3 = news } } .. _Frontend: Frontend """""""" |img-5| .. _With-the-latest-three-News: With the latest three News -------------------------- The third plugin should display only the latest three news. .. _TypoScript: TypoScript ^^^^^^^^^^ Add to the third view the following TypoScript the lines 12 and 13 (see the TypoScript snippet below): plugin.tx\_browser\_pi1 { views { list { 1 { select = fe\_users.username, fe\_groups.title } 2 { select = be\_users.username, be\_groups.title } 3 { select = tt\_news.title, tt\_news\_cat.title orderBy = tt\_news.datetime DESC limit = 0,3 } } } } Line 12: News will be ordered by their datetime and descending. Line 13: News will limited to the first three records. .. _Plugin: Plugin ^^^^^^ We don't want to display - any search field - any a-z browser - any page browser and we don't want an empty list at start. |img-5| .. _Result-in-the-Frontend: Result in the Frontend ^^^^^^^^^^^^^^^^^^^^^^ |img-5| .. _Templating: Templating ^^^^^^^^^^ If you like to change the template please read the section "HTML Templating" in the Tutorial Basic: HTML: `http://typo3.org/documentation/document-library/extension- manuals/browser\_tut\_basics\_en/current/ `_ .. _Single-Views: Single Views ------------ This tutorial doesn't repeat, how to get a single view. Please refer to the Manual and Tutorial: .. _Browser-Manual: Browser Manual ^^^^^^^^^^^^^^ - HTML `http://typo3.org/documentation/document-library/extension- manuals/browser/current/ `_ - PDF: `http://typo3.org/extensions/repository/view/browser/current/info /?tx\_terfe\_pi1%5BdownloadFile%5D=doc%252Fmanual.pdf `_ .. _Browser-Tutorial-Basics: Browser Tutorial Basics ^^^^^^^^^^^^^^^^^^^^^^^ - HTML: `http://typo3.org/documentation/document-library/extension- manuals/browser\_tut\_basics\_en/current/ `_ - PDF: `http://typo3.org/extensions/repository/view/browser\_tut\_basics \_en/current/info/?tx\_terfe\_pi1%5BdownloadFile%5D=doc%252Fmanual.pdf `_ .. _No-Cache: No Cache -------- The Browser enables to use several plugins cached and no cached on the same page .. _Case-story: Case story ^^^^^^^^^^ Let's assume we want to display - a plugin for news with the latest ten news - a plugin for people with three random peoples. The plugin doesn't be cached. If it would be cached, there would be a random list once only. .. _Tutorial: Tutorial ^^^^^^^^ You configure the plugin for the ten latest news in the common way. You configure the plugin for the three random people like in the example below. .. _Plugin: Plugin """""" |img-5| You are using the plugin "Browser (no cache)". .. _Include-Static-Template: Include Static Template """"""""""""""""""""""" |img-5| You are including both Browser templates: - Browser (browser) - Template of third party extension - Browser (no cache) (browser) The third one needs the first one, because the third one takes the TypoScript code of the first one and save it as plugin.tx\_browser\_pi4 = USER\_INT USER\_INT effects, that the plugin won't be cached. .. _TypoScript-Snippet: TypoScript Snippet """""""""""""""""" Configure your people views with the plugin.tx\_browser\_pi1 array, if you are configuring a static template which will be included. plugin.tx\_browser\_pi1 { views { list { 1 { select ( fe\_users.last\_name, fe\_users.first\_name ) random = 1 } } single { 1 { select ( fe\_users.last\_name, fe\_users.first\_name, fe\_users.title, fe\_users.image, fe\_users.telephone, fe\_users.fax, fe\_users.email } } } } } If you are configure the browser in your template directly - in the setup field - and configure the plugin.tx\_browser\_pi4 plugin.tx\_browser\_pi4 { views { list { 1 { select ( ... .. _RealUrl: RealUrl ------- .. _Configurable-tx-browser-pi1-showUid: Configurable tx\_browser\_pi1[showUid] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If your are using realUrl and plugins with different databases, you can configure the name of the piVar showUid. showUid is the URL parameter with the record uid for links to the single view. .. _Example: Example """"""" You have two plugins on the same page The first plugin displays a list of tt\_news records. The second plugin displays a list of fe\_users records. .. _TypoScript: TypoScript """""""""" plugin.tx\_browser\_pi1 { views { list { 1 { select ( tt\_news.title ) } 2 { showUid = feusersUid select ( fe\_users.name ) } } } } The TypoScript above effects, that the tt\_news.uid will get the parameter name tx\_browser\_pi1[showUid] (this is the default) the fe\_users.uid will get the parameter name tx\_browser\_pi1[feusersUid] Now you are able to configure in the realUrl configuration array the lookuptables differently. .. _RealURL-configuration-snippet: RealURL configuration snippet """"""""""""""""""""""""""""" $TYPO3\_CONF\_VARS['EXTCONF']['realurl']['\_DEFAULT']['postVarSets'] = array ( '\_DEFAULT' => array ( 'news' => array ( array ( 'GETvar' => 'tx\_browser\_pi1[showUid]', 'lookUpTable' => array ( 'table' => 'tt\_news', 'id\_field' => 'uid', 'alias\_field' => 'title', 'addWhereClause' => ' AND NOT deleted AND NOT hidden', 'useUniqueCache' => 1, 'useUniqueCache\_conf' => array ( 'strtolower' => 1, 'spaceCharacter' => '-', ), ) ), ), 'name' => array ( array ( 'GETvar' => 'tx\_browser\_pi1[feusersUid]', 'lookUpTable' => array ( 'table' => 'fe\_users', 'id\_field' => 'uid', 'alias\_field' => 'name', 'addWhereClause' => ' AND NOT deleted AND NOT hidden', 'useUniqueCache' => 1, 'useUniqueCache\_conf' => array ( 'strtolower' => 1, 'spaceCharacter' => '-', ), ) ), ), ), ), .. _Reference: Reference --------- The Browser has it's own manual with the reference of course. - HTML `http://typo3.org/documentation/document-library/extension- manuals/browser/current/ `_ - PDF: `http://typo3.org/extensions/repository/view/browser/current/info /?tx\_terfe\_pi1%5BdownloadFile%5D=doc%252Fmanual.pdf `_ .. _Helpful-suggestions: Helpful suggestions ------------------- If you have helpful suggestions, feel free to contact me: wildt.at .die-netzmacher.de. .. _To-Do-List: To-Do List ---------- Nothing to do. .. _Change-Log: Change Log ---------- 3.4.4 **New Features** - #9917: Selecting a random sample from a set of rows.Browser Plugin no cache. 3.4.2 **New Features** - #9683: Selectable list views from TypoScript in the plugin- #9599: Manual configuring of piVar showuid Publishing 3.0.1 **Publishing** .. _Illustration-Index: Illustration Index ------------------ Illustration 1: Example with three plugins 3 Illustration 2: Same example but with latest news 3 Illustration 3: Tutorial in PDF format 4 Illustration 4: Page tree with the page "tutorial" and the sysfolders "fe\_user" and "news". 5 Illustration 5: Include static template from extension 6 Illustration 6: Adding the startingpoints 6 Illustration 7: Adding the view 7 Illustration 8: The three plugins in the Frontend 8 Illustration 9: One plugin with three views 9 Illustration 10: Result in the Frontend 10 Illustration 11: Plugin with disabled options 11 Illustration 12: With latest news 12 Illustration 13: Plugin Browser (no cache) 14 Illustration 14: Plugin Browser (no cache) 14 22 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. |img-2| image:: img-2.png .. :border: 0 .. :height: 27 .. :hspace: 4 .. :id: Grafik2 .. :name: Grafik2 .. :width: 98 .. |img-3| image:: img-3.png .. :align: bottom .. :border: 0 .. :height: 27 .. :id: graphics25 .. :name: graphics25 .. :width: 30 .. |img-4| image:: img-4.png .. :align: bottom .. :border: 0 .. :height: 268 .. :id: graphics5 .. :name: graphics5 .. :width: 302 .. |img-5| image:: data: :alt: Frame5 .. :align: bottom .. :id: Frame5 .. :name: Frame5 .. |img-6| image:: img-6.jpeg .. :align: left .. :border: 0 .. :height: 205 .. :id: graphics1 .. :name: graphics1 .. :width: 227 .. |img-7| image:: img-7.jpeg .. :align: left .. :border: 0 .. :height: 789 .. :id: graphics11 .. :name: graphics11 .. :width: 454