.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ============================== Auto grouping sitemap and menu ============================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed: 2012-07-10T22:01:59 :Classification: autositemap :Description: Plugin for a sitemap and menu which groups the first four menus in first four columns and all others in a fifth column. Great menus will get a linebreak. Configuration is based on TypoScript HMENU. :Keywords: sitemap, menu, grouping :Author: Dirk Wildt, Die Netzmacher :Email: http://wildt.at.die-netzmacher.de :Website: http://die-netzmacher.de :Language: en |img-1| |img-2| extKey: autositemap |img-3| .. _Auto-grouping-sitemap-and-menu: Auto grouping sitemap and menu ============================== |img-4| Version: 1.1.1, 2014-01-09 Extension Key: autositemap Language: en Keywords: sitemap, menu, grouping Copyright 2012-2014, 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 `Auto grouping sitemap and menu 1 <#__RefHeading__1813_1267833485>`_ `Screen Shots 3 <#__RefHeading__1815_1267833485>`_ `Frontend 3 <#__RefHeading__3312_1728713628>`_ `Backend 3 <#__RefHeading__3314_1728713628>`_ `Layout Samples 4 <#__RefHeading__3316_1728713628>`_ `Introduction 5 <#__RefHeading__3318_1728713628>`_ `What does it do? 5 <#__RefHeading__1817_1267833485>`_ `Installation 6 <#__RefHeading__10282_1267833485>`_ `One page only 6 <#__RefHeading__3320_1728713628>`_ `Website wide Installation 6 <#__RefHeading__2041_318886146>`_ `Priority 7 <#__RefHeading__2016_35108197>`_ `First of all 7 <#__RefHeading__2018_35108197>`_ `Maximum of line breaks 7 <#__RefHeading__2028_35108197>`_ `One line break only 9 <#__RefHeading__2030_35108197>`_ `No line break for any menu 10 <#__RefHeading__2032_35108197>`_ `TypoScript Constant-Editor 11 <#__RefHeading__4853_357639053>`_ `AUTOSITEMAP – MENU CONFIGURATION 11 <#__RefHeading__3322_1728713628>`_ `AUTOSITEMAP – RULES 12 <#__RefHeading__4861_357639053>`_ `AUTOSITEMAP – DEBUGGING 12 <#__RefHeading__4865_357639053>`_ `TypoScript Object-Browser 13 <#__RefHeading__5581_1728713628>`_ `CSS 13 <#__RefHeading__4871_357639053>`_ `Master Template 13 <#__RefHeading__4958_1728713628>`_ `Debugging 14 <#__RefHeading__3332_1728713628>`_ `Follow the Workflow 14 <#__RefHeading__3375_1430831926>`_ `HTML Code 15 <#__RefHeading__3334_1728713628>`_ `Reference 17 <#__RefHeading__1147_1430831926>`_ `Whats new in ... 20 <#__RefHeading__5688_357639053>`_ `... version 1.0? 20 <#__RefHeading__5690_357639053>`_ `Update 21 <#__RefHeading__455_1545478481>`_ `Update from < 0.9.x 21 <#__RefHeading__5692_357639053>`_ `Helpful suggestions 22 <#__RefHeading__5694_357639053>`_ `Known Bugs 23 <#__RefHeading__19950_2136419308>`_ `To-Do List 24 <#__RefHeading__1853_1267833485>`_ `Change Log 25 <#__RefHeading__1855_1267833485>`_ `Illustration Index 26 <#__RefHeading__3336_1728713628>`_ .. _Screen-Shots: Screen Shots ------------ .. _Frontend: Frontend ^^^^^^^^ |img-5| |img-5| |img-5| |img-5| .. _Backend: Backend ^^^^^^^ |img-5| .. _Layout-Samples: Layout Samples ^^^^^^^^^^^^^^ Four examples. Ten layouts are possible. |img-5| |img-5| |img-5| |img-5| .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ - autositemap generates a sitemap or menu in columns. - autositemap tries to split menus for the best design. Ten designs are possible. - For example: Big menus can get two columns. - If you have more than four menus, the rest will placed in a fifth column. - The menus in the first four columns has a depth of three levels by default. - The menus in the fifth column has a depth of two levels by default. - You can control the behaviour of placements with one of three priorities: - Maximum of line breaks - One line break only - No line break for any menu See "Priority" on page 7 below for more details. - The menus are configured by TypoScript. They are based on the HMENU and TMENU. But you can't use all HMENU properties! - The used HTML classes by the include static template "+Autositemap YAML (autositemap)" are based on the YAML CSS. But the JavaScript framework YAML isn't needed. .. _Installation: Installation ------------ .. _One-page-only: One page only ^^^^^^^^^^^^^ - Install the extension. - Add the plugin to a page, where you like to use the autositemap. - Add the TypoScript templates to the static templates of the TypoScript of this page: - Autositemap (autositemap) - +Autositemap YAML (autositemap) - Configure autositemap supported by the TypoScript Constant Editor. |img-5| .. _Website-wide-Installation: Website wide Installation ^^^^^^^^^^^^^^^^^^^^^^^^^ - Install the extension. - Add a sysfolder "libraries" to your website. - Add a page "sitemap" into the page "libraries". - Add the plugin into the page "sitemap" - Add the TypoScript templates to the static templates of the TypoScript of your root page: - Autositemap (autositemap) - +Autositemap YAML (autositemap) - Include the content of the page "sitemap" website wide by TypoScript or TemplaVoilá. - Configure autositemap supported by the TypoScript Constant Editor. |img-5| .. _Priority: Priority -------- .. _First-of-all: First of all ^^^^^^^^^^^^ .. _The-marginal-Column: The marginal Column """"""""""""""""""" The fifth column is a marginal column. It contains menus, which aren't contained by the first four columns. The fifth column doesn't place any line break in a menu. .. _The-Competition-of-big-Menus: The Competition of big Menus """""""""""""""""""""""""""" There are some cases imaginable with menus which compete against other menus for a line break. autositemap tries to find the best solution in this cases. .. _Maximum-of-line-breaks: Maximum of line breaks ^^^^^^^^^^^^^^^^^^^^^^ .. _Explanation: Explanation """"""""""" autositemap gives priority to the maximum of line breaks. If first two menus have enough items for a line break, they will fill the first four columns. All other menus will fill the fifth column. .. _TypoScript-Constant-Editor: TypoScript Constant Editor """""""""""""""""""""""""" |img-5| Web Modul: Template Page tree: Root page or page of your choice Edit area: [Constant Editor] Categorie: [AUTOSITEMAP – RULES] Priority: [maxLineBreaks] .. _Possible-cases: Possible cases """""""""""""" |img-5| |img-5| |img-5| |img-5| |img-5| If you haven't enough menus, there won't be any marginal column. .. _One-line-break-only: One line break only ^^^^^^^^^^^^^^^^^^^ .. _Explanation: Explanation """"""""""" Only one menu will get a line break at maximum. If there are only three menus, one of the menus must have enough items for a line break. If there are more than three menus, one of the first two menus must have enough items for a line break. .. _TypoScript-Constant-Editor: TypoScript Constant Editor """""""""""""""""""""""""" |img-5| Web Modul: Template Page tree: Root page or page of your choice Edit area: [Constant Editor] Categorie: [AUTOSITEMAP – RULES] Priority: [oneLineBreak] .. _Possible-cases: Possible cases """""""""""""" |img-5| |img-5| |img-5| |img-5| If you haven't enough menus, there won't be any marginal column. .. _No-line-break-for-any-menu: No line break for any menu ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. _Explanation: Explanation """"""""""" Any menu won't get any line break. .. _TypoScript-Constant-Editor: TypoScript Constant Editor """""""""""""""""""""""""" |img-5| Web Modul: Template Page tree: Root page or page of your choice Edit area: [Constant Editor] Categorie: [AUTOSITEMAP – RULES] Priority: [noLineBreak] .. _Possible-cases: Possible cases """""""""""""" |img-5| |img-5| If you have less than four menus, you will receive less columns. .. _TypoScript-Constant-Editor: TypoScript Constant-Editor -------------------------- .. _AUTOSITEMAP-MENU-CONFIGURATION: AUTOSITEMAP – MENU CONFIGURATION ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. _Root-page-id-this-is-a-must: Root page id (this is a must!) """""""""""""""""""""""""""""" Uid of the root page. Menu / sitemap will calculated from this startingpoint. You will get an error, if root page id is empty! .. _Doktypes: Doktypes """""""" You can exclude doktypes from the sitemap. The doktypes 3, 6, 7, 199, 254, 255 (see below) are excluded by default. That means: the doktypes page and short cut will displayed by default. |img-5| Defined doktypes 1: page 3: link to an external URL 4: Shortcut 6: page for backend user 7: mount point 199: menu seperator 254: folder 255: recycler .. _Exclude-uids: Exclude uids """""""""""" Comma separated list of ids of pages, which should ignored. All subpages of an excluded page will ignored too. .. _AUTOSITEMAP-RULES: AUTOSITEMAP – RULES ^^^^^^^^^^^^^^^^^^^ .. _Priority: Priority """""""" |img-5| - maxLineBreaks: If menus have enough items, they become double columns. - oneLineBreak: The greeatest menu will get a double column, if there are less than four menus. - noLineBreak: If there are enough menus, each menu becomes one column only. See details at "Priority" on page 7 above. .. _Minimum-menu-items-for-a-line-break: Minimum menu items for a line break """"""""""""""""""""""""""""""""""" A menu must contains at least this number of submenus or and items, if it should get a line break. .. _AUTOSITEMAP-DEBUGGING: AUTOSITEMAP – DEBUGGING ^^^^^^^^^^^^^^^^^^^^^^^ .. _Enable-Debugging: Enable Debugging """""""""""""""" HTML comments will displayed. See details at "HTML Code" on page 15 below. .. _TypoScript-Object-Browser: TypoScript Object-Browser ------------------------- .. _CSS: CSS ^^^ autositemap includes a CSS file while runtime. page.includeCSS { tx\_autositemap\_pi1\_yaml = EXT:autositemap/res/pi1/yaml/autositemap\_yaml.css } If you don't need it, please configure: page.includeCSS { tx\_autositemap\_pi1\_yaml > } If you need an own CSS file please configure something like this: page.includeCSS { tx\_autositemap\_pi1\_yaml > tx\_autositemap\_pi1\_yaml = fileadmin/my\_files/my\_own.css } .. _Master-Template: Master Template ^^^^^^^^^^^^^^^ The TypoScript properties are configured by a master template in general. The parts of the master template are allocated to the autositemap plugin like in the snippet below: plugin.tx\_autositemap\_pi1 { css < plugin.tx\_autositemap\_pi1.master\_templates.yaml.css html < plugin.tx\_autositemap\_pi1.master\_templates.yaml.html menu\_main < plugin.tx\_autositemap\_pi1.master\_templates.yaml.menus.menu\_main menu\_main\_last < plugin.tx\_autositemap\_pi1.master\_templates.yaml. menus.menu\_main\_last menu\_margin < plugin.tx\_autositemap\_pi1.master\_templates.yaml.menus.menu\_margin } If you like to configure your own layout, please configure your own master template. A good example is the TypoScript of "+Autositemap YAML (autositemap)". See the files: autositemap/static/pi1/yaml - constants.txt - setup.txt .. _Example-Third-level-in-the-menu-margin: Example: Third level in the menu margin ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The menu margin renders menus two levels only by default. If you like to display the third level too, please use this code snippet: plugin.tx\_autositemap\_pi1 {menu\_margin {3 < plugin.tx\_autositemap\_pi1.menu\_main.3}} See more supporteed by the TypoScript Object Browser. .. _More-Configuration-in-Depth: More Configuration in Depth ^^^^^^^^^^^^^^^^^^^^^^^^^^^ There are a lot of properties for customising. Sorry, that these properties aren't a subject of this manual. You have the option to inspect the TypoScript only. .. _Debugging: Debugging --------- .. _Follow-the-Workflow: Follow the Workflow ^^^^^^^^^^^^^^^^^^^ You can follow the workflow with the DRS – the Development Reporting System. You need the extension devlog. .. _DRS-Development-Reporting-System: DRS – Development Reporting System """""""""""""""""""""""""""""""""" The DRS – Development Reporting System – prompts the whole workflow into the devlog. If you have any unexpected result, please enable the DRS by the extension manager. .. _Enabling: Enabling ~~~~~~~~ |img-5| Modul Admin Tools: Extension Manager Edit area: Select autositemap [Configuration] DRS: [Enabled] [Update] Reload the page with the autositemap in the frontend. .. _Report: Report ~~~~~~ |img-5| Follow the workflow: read the report! .. _HTML-Code: HTML Code ^^^^^^^^^ The autositemap uses some markers for replacement of HTML wraps. It simplifies to fix bugs, if the markers won't replaced in the HTML code, if there is any unexpected result, .. _Debugging: Debugging """"""""" |img-5| Enable HTML comments (markers won't removed): Modul Web: Template Page tree: Select a page with the autositemap plugin Edit area: [Constant Editor] Category: [AUTOSITEMAP - DEBUGGING] [X] Enable Debugging Reload the page in the frontend. Inspect the HTML source code. |img-5| .. _Reference: Reference --------- .. ### BEGIN~OF~TABLE ### .. _css: css ^^^ .. container:: table-row Property css Data type array Description Variables for your CSS classes. Please take a look into TypoScript of "+Autositemap YAML (autositemap)" see "Master Template" on page 13 above. **Example:** :: plugin.tx_autositemap_pi1 { css { // One menu in a single column 10 = tx_autositemap_pi1_menus_01 10 { // Class for a single column mainSingle = TEXT mainSingle { value = 100 } } // One menu in a double column 11 = tx_autositemap_pi1_menus_01_wi_01_double 11 { // Class for a double column mainDouble = TEXT mainDouble { value = 100 } } ... } } Default .. _debugging: debugging ^^^^^^^^^ .. container:: table-row Property debugging Data type array Description Support for debugging: HTML comments will removed by default (0). Please configure it by the TypoScript Constant Editor! **Example:** :: plugin.tx_autositemap_pi1 { debugging { dontRemoveHtmlComments = TEXT dontRemoveHtmlComments { value = 0 } } } Default 0 .. _html: html ^^^^ .. container:: table-row Property html Data type array Description HTML snippets for wraps. The snippets must contain the variable %content%. %content% will replaced with the current main menu or submenu. Please take a look into TypoScript of "+Autositemap YAML (autositemap)" see "Master Template" on page 13 above. **Example:** :: plugin.tx_autositemap_pi1 { html { sitemap = TEXT sitemap { ... } menuMainOuterWrap = TEXT menuMainOuterWrap { ... } menuMainInnerWrap = TEXT menuMainInnerWrap { ... } menuSubOuterWrap = TEXT menuSubOuterWrap { ... } } } Default .. _master-templates: master\_templates ^^^^^^^^^^^^^^^^^ .. container:: table-row Property master\_templates Data type array Description Master templates: it contains the whole configuration for the HMENU with TMENUs. Please take a look into TypoScript of "+Autositemap YAML (autositemap)" see "Master Template" on page 13 above. **Example:** :: plugin.tx_autositemap_pi1 { master_templates = master_templates { ... } } Default .. _menu-main: menu\_main ^^^^^^^^^^ .. container:: table-row Property menu\_main menu\_margin Data type array Description Configuration of the menu in the main section (first four columns) and of the menu in the margin section (fifth column). Please take a look into TypoScript of "+Autositemap YAML (autositemap)" see "Master Template" on page 13 above. **Example:** :: plugin.tx_autositemap_pi1 { menu_main = menu_main_last = menu_margin = } Default .. _rules: rules ^^^^^ .. container:: table-row Property rules Data type array Description Rules for the number of columns and the line break position. Please configure it by the TypoScript Constant Editor! **Example:** :: plugin.tx_autositemap_pi1 { // Rules for number of columns and line break rules = rules { // Minimum of submenus and items for a line break menuItems = menuItems { ... } // Number of columns ...: DON'T TOUCH IT! numberOfColumns = numberOfColumns { ... } // Priority priority = TEXT priority { ... } }} Default .. _sql: sql ^^^ .. container:: table-row Property sql Data type array Description SQL statements. Contains an andWhere for the pages table only. Configuration has to correspond with the configuration of the HMENU. You don't need to configure it. **Example:** :: plugin.tx_autositemap_pi1 { sql { // Table pages = pages { andWhere = TEXT andWhere { value = AND doktype NOT IN \ ({$plugin.tx_autositemap_pi1.hmenu.excludeDoktypes})\ AND nav_hide = 0 noTrimWrap = | || } } } } Default .. ###### END~OF~TABLE ###### .. _Whats-new-in: Whats new in ... ---------------- .. _version-1-0: ... version 1.0? ^^^^^^^^^^^^^^^^ .. _Exclude-page-Ids: Exclude page Ids """""""""""""""" [1.0.0] You can exclude page ids from the the menu / sitemap. .. _Configurable-rootpage-ID: Configurable rootpage ID """""""""""""""""""""""" [1.0.0] You can configure the rootpage / staringpoint of the menu / sitemap. .. _Update: Update ------ .. _Update-from-0-9-x: Update from < 0.9.x ^^^^^^^^^^^^^^^^^^^ You have to allocate the root page id supported by the TypoScript Constant-Editor. See "Root page id (this is a must!)" on page 11 above. .. _Helpful-suggestions: Helpful suggestions ------------------- If you have helpful suggestions, feel free to send a question, a bug or a code snippet by e-mail. See `http://wildt.at.die-netzmacher.de `_ . E-mails are welcome in English and German. .. _Known-Bugs: Known Bugs ---------- The option "One Line Break" doesn't seem to work proper. .. _To-Do-List: To-Do List ---------- Check the option "One Line Break". .. _Change-Log: Change Log ---------- 1.1.1 **Improvement** #i0002: ManualSample for a third level in the menu margin 1.1.0 **Task** \* #53373: State: Alpha -> BetaBug\* #53374: calcMenusForCase: array\_keys() expects parameter 1 to be array, null given\* pi1\class.tx\_autositemap\_pi1.php on line 1120 1.0.1 **Bugfix** \* #i0001: CSS 1.0.0 **New Features** \* #43696: Exclude page ID\* #43695: Configurable rootpage ID 0.9.3 **Bugfix** \* static/pi1/yaml/setup.txt: ACRIFSUB > ACTIFSUB 0.9.2 **Bugfix** \* array\_keys() expects parameter 1 to be array in pi1/class.tx\_autositemap\_pi1.php line 2729 0.9.1 **Publishing** Update\* Manual 0.0.4 **Improvements** \* margin column get the class ym-gr (former: ym\_gl)\* Configuring the TypoScript Constant EditorBugfix\* pi1/locallang.xml 0.0.3 **New Feature** \* multiple master\_templatesEffected file: static/pi1/setup.txt\* priorities: plugin.tx\_autositemap\_pi1.rules.priority\* maxLineBreaks\* oneLineBreak\* noLineBreak 0.0.2 **Manual** 0.0.1 **Initial release** Dirk Wildt `http://wildt.at.die- netzmacher.de `_ .. _Illustration-Index: Illustration Index ------------------ Illustration 1: Two main columns, one marginal column 3 Illustration 2: Four main columns, one marginal column 3 Illustration 3: Three main columns, one marginal column 3 Illustration 4: Four main columns, one marginal column 3 Illustration 5: TypoScript Constant Editor 3 Illustration 6: Four main columns, one marginal column 4 Illustration 7: Three main columns, one marginal column 4 Illustration 8: Two main columns 4 Illustration 9: Four main columns 4 Illustration 10: Include static (from extensions) 6 Illustration 11: The autositemap plugin 6 Illustration 12: TypoScript Constant Editor - maxLineBreaks 7 Illustration 13: Any menu hasn't enough items for a line break. 8 Illustration 14: The 1st menu has enough items for a line break. 8 Illustration 15: The 2nd menu has enough items for a line break. 8 Illustration 16: The 3rd menu has enough items for a line break. 8 Illustration 17: The 1st and 2nd menu have enough items for a line break. 8 Illustration 18: TypoScript Constant Editor - maxLineBreaks 9 Illustration 19: Any menu hasn't enough items for a line break. 9 Illustration 20: The 1st menu has enough items for a line break. 9 Illustration 21: The 2nd menu has enough items for a line break. 9 Illustration 22: The 3rd menu has enough items for a line break. 9 Illustration 23: TypoScript Constant Editor - maxLineBreaks 10 Illustration 24: Any menu hasn't a line break. 10 Illustration 25: Same case with four menus 10 Illustration 26: Configuring doktypes 11 Illustration 27: Rule for a line break 12 Illustration 28: Enable the DRS – Development Reporting System 14 Illustration 29: Report of the DRS – Development Reporting System 15 Illustration 30: Display HTML comments 15 Illustration 31: HTML source code with autositemap marker 16 26 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. |img-2| image:: img-2.jpeg .. :border: 0 .. :height: 20 .. :id: Grafik1 .. :name: Grafik1 .. :width: 69 .. |img-3| image:: img-3.png .. :align: bottom .. :border: 0 .. :height: 16 .. :id: graphics2 .. :name: graphics2 .. :width: 18 .. |img-4| image:: img-4.png .. :align: bottom .. :border: 0 .. :height: 268 .. :id: graphics3 .. :name: graphics3 .. :width: 302 .. |img-5| image:: data: :alt: Frame1 .. :align: bottom .. :id: Frame1 .. :name: Frame1