From 7f53b3f306f709465eae2d2b82f248c7395533ed Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Tue, 29 Jun 2021 11:25:50 +0200 Subject: [PATCH] [FEATURE] Move HMENU special userfunc example from TSREF (#43) * [FEATURE] Move HMENU special userfunc example from TSREF refs https://github.com/TYPO3-Documentation/t3docs-screenshots/issues/151 * [FEATURE] Move HMENU special userfunc example from TSREF refs https://github.com/TYPO3-Documentation/t3docs-screenshots/issues/151 Co-authored-by: lina.wolf --- Classes/Userfuncs/CustomMenu.php | 54 + Configuration/TCA/Overrides/sys_template.php | 16 + .../TypoScript/HmenuSpecial/setup.typoscript | 29 + Initialisation/data.xml | 1074 ++++++++++------- 4 files changed, 770 insertions(+), 403 deletions(-) create mode 100644 Classes/Userfuncs/CustomMenu.php create mode 100644 Configuration/TCA/Overrides/sys_template.php create mode 100644 Configuration/TypoScript/HmenuSpecial/setup.typoscript diff --git a/Classes/Userfuncs/CustomMenu.php b/Classes/Userfuncs/CustomMenu.php new file mode 100644 index 0000000..5ee55fc --- /dev/null +++ b/Classes/Userfuncs/CustomMenu.php @@ -0,0 +1,54 @@ + 'Contact', + '_OVERRIDE_HREF' => 'index.php?id=10', + '_SUB_MENU' => [ + [ + 'title' => 'Offices', + '_OVERRIDE_HREF' => 'index.php?id=11', + '_OVERRIDE_TARGET' => '_top', + 'ITEM_STATE' => 'ACT', + '_SUB_MENU' => [ + [ + 'title' => 'Copenhagen Office', + '_OVERRIDE_HREF' => 'index.php?id=11&officeId=cph', + ], + [ + 'title' => 'Paris Office', + '_OVERRIDE_HREF' => 'index.php?id=11&officeId=paris', + ], + [ + 'title' => 'New York Office', + '_OVERRIDE_HREF' => 'http://www.example.com', + '_OVERRIDE_TARGET' => '_blank', + ] + ] + ], + [ + 'title' => 'Form', + '_OVERRIDE_HREF' => 'index.php?id=10&cmd=showform', + ], + [ + 'title' => 'Thank you', + '_OVERRIDE_HREF' => 'index.php?id=10&cmd=thankyou', + ], + ], + ], + [ + 'title' => 'Products', + '_OVERRIDE_HREF' => 'index.php?id=14', + ] + ]; + } +} diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php new file mode 100644 index 0000000..b163786 --- /dev/null +++ b/Configuration/TCA/Overrides/sys_template.php @@ -0,0 +1,16 @@ +makeMenuArray + + 1 = TMENU + 1.wrap = + 1.NO = 1 + 1.NO { + wrapItemAndSub =
  • |
  • + } + + 2 = TMENU + 2.wrap = + 2.NO = 1 + 2.NO { + wrapItemAndSub =
  • |
  • + } + + 3 = TMENU + 3.wrap = + 3.NO = 1 + 3.NO { + wrapItemAndSub =
  • |
  • + } +} diff --git a/Initialisation/data.xml b/Initialisation/data.xml index 2cd11e4..291ee48 100644 --- a/Initialisation/data.xml +++ b/Initialisation/data.xml @@ -10,14 +10,17 @@ 11.3.0-dev - Friday 4. June 2021 + Tuesday 29. June 2021 - - sys_file_storage - sys_filemounts - sys_language - - + + + 1 + 1 + 1 + 1 + 1 + 1 + utf-8 @@ -28,16 +31,19 @@ 1 - - 2 + + 3 - - 3 + + 4 - - 86 + + 6 + + + 2 @@ -45,15 +51,65 @@ - +
    + + 1 + 0 + t3docs-collaboration.jpg + + + 1 +
    sys_file_storage
    + + + 1 + sys_file_metadata
    +
    + + + + + + + 1 + 0 + t3docs-collaboration.jpg + + + 1 +
    sys_file
    + + + + + + 1 0 + fileadmin + + + +
    + + + 2 + 0 Examples Export Preset
    + + + 1 + 0 + My dashboard + + + +
    1 @@ -62,214 +118,390 @@ - - 86 + + 2 1 Frontend Users - - 2 + + 6 1 - TCA Reference Examples + HMENU special userfunc 3 - 2 + 1 + TCA Reference Examples + + + + + 4 + 3 Plugin FlexForm Configuration
    - +
    1 1 - The TYPO3 Documentation Team + t3docs-collaboration.jpg - + 1 -
    sys_file_reference
    + sys_file
    - - header_link + + link typolink https://typo3.org/community/teams/documentation external - 2487ce518ed56d22f20f259928ff43f1 + c1e48e4548f2b5eb88a3e220d3a8b238 https://typo3.org/community/teams/documentation - - 2 - 3 - Advanced FlexForm in plugin - - - 3 - pages
    -
    -
    - -
    - - - 4 - 86 - Website Users - - - -
    - +
    2 - 86 - example_user - - - 4 -
    fe_groups
    - - - - - - - - 1 1 - t3docs-collaboration.jpg - 1 + The TYPO3 Documentation Team - + 1 -
    sys_file
    + sys_file_reference
    - - link + + header_link typolink https://typo3.org/community/teams/documentation external - c1e48e4548f2b5eb88a3e220d3a8b238 + 81b8b33df54ef433f1cbc7c3e513e6c4 https://typo3.org/community/teams/documentation - - 1 - 0 - t3docs-collaboration.jpg - 2 + 4 + Advanced FlexForm in plugin - - 1 -
    sys_file_storage
    - - - 1 - sys_file_metadata
    + + 4 + pages
    - +
    1 - 0 - t3docs-collaboration.jpg - 3 + 2 + Website Users + + + +
    + + + 1 + 2 + example_user - + 1 -
    sys_file
    + fe_groups
    + + + 1 + 6 + NEW SITE + + + + include_static_file + ext_fileref + EXT:fluid_styled_content/Configuration/TypoScript/ + + + include_static_file + ext_fileref + EXT:fluid_styled_content/Configuration/TypoScript/Styling/ + + + include_static_file + ext_fileref + EXT:examples/Configuration/TypoScript/HmenuSpecial/ + + + +
    - +
    1
    - +
    1
    - +
    1
    - +
    + 1 +
    + + 1 +
    + 1
    - +
    1
    - - 1 +
    1
    - - 1 +
    + 1 + 1 + 1
    - + - 1 + 1
    - 1 + 1
    - - - 1 + +
    + 1
    + + 1 +
    +
    + - 1 + 1
    t3docs-collaboration.jpg - 1622714721 + 1624911438 - + + + 1 + 0 + 1624911438 + 0 + 0 + 1 + 2 + 0 + /examples/t3docs-collaboration.jpg + abed34f1672180294343569768f22a488fe0e7f6 + bb7825c9d34486c1e8c632a23b2b84932e7287e1 + jpg + image/jpeg + t3docs-collaboration.jpg + a93f3b195dcbf008d785e7cb2d8977d8c4d3b77e + 96187 + 1624911438 + 1624911438 + + + + db + + + 1 + sys_file_storage
    +
    +
    +
    + + db + + + 1 + sys_file_metadata
    +
    +
    +
    +
    +
    + + + 1 + 0 + 1624911436 + 1622547511 + 1 + 0 + 0 + + 0 + {"file":""} + 0 + 0 + 0 + 0 + 1 + + 1500 + 844 + + + 1 + + + + + + + + + + + + + 0.00000000000000 + 0.00000000000000 + 0 + 0 + 0 + + + 0 + + 0 + + + 0 + + + + db + + + 1 + sys_file
    +
    +
    +
    +
    +
    + 1 0 - 1622714717 - 1622714717 + 1624911436 + 1624911436 + 0 + 0 + This is the local fileadmin/ directory. This storage mount has been created automatically by TYPO3. + fileadmin + Local + <?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<T3FlexForms> + <data> + <sheet index="sDEF"> + <language index="lDEF"> + <field index="basePath"> + <value index="vDEF">fileadmin/</value> + </field> + <field index="pathType"> + <value index="vDEF">relative</value> + </field> + <field index="caseSensitive"> + <value index="vDEF">1</value> + </field> + </language> + </sheet> + </data> +</T3FlexForms> + 1 + 1 + 1 + 1 + 1 + 1 + + + + + flex + + + + + + + + + + 2 + 0 + 1624958329 + 1624956970 1 Examples Export Preset 1 0 - a:15:{s:8:"pagetree";a:3:{s:2:"id";s:1:"0";s:6:"levels";s:3:"999";s:6:"tables";a:2:{i:0;s:10:"tt_content";i:1;s:17:"tx_impexp_presets";}}s:12:"external_ref";a:1:{s:6:"tables";a:4:{i:0;s:8:"sys_file";i:1;s:19:"sys_file_collection";i:2;s:17:"sys_file_metadata";i:3;s:18:"sys_file_reference";}}s:15:"external_static";a:1:{s:6:"tables";a:3:{i:0;s:16:"sys_file_storage";i:1;s:14:"sys_filemounts";i:2;s:12:"sys_language";}}s:19:"showStaticRelations";s:1:"1";s:15:"excludeDisabled";s:1:"1";s:20:"download_export_name";s:14:"tree_PID0_L999";s:6:"preset";a:2:{s:5:"title";s:22:"Examples Export Preset";s:6:"public";i:1;}s:4:"meta";a:3:{s:5:"title";s:22:"Examples Export Preset";s:11:"description";s:74:"Use it to export the page tree repeatedly during EXT:examples development.";s:5:"notes";s:0:"";}s:8:"filetype";s:3:"xml";s:8:"filename";s:8:"data.xml";s:24:"excludeHTMLfileResources";s:0:"";s:26:"saveFilesOutsideExportFile";s:1:"1";s:13:"extension_dep";s:0:"";s:10:"softrefCfg";a:2:{s:32:"2487ce518ed56d22f20f259928ff43f1";a:1:{s:4:"mode";s:0:"";}s:32:"c1e48e4548f2b5eb88a3e220d3a8b238";a:1:{s:4:"mode";s:0:"";}}s:7:"exclude";a:0:{}} + a:15:{s:8:"pagetree";a:3:{s:2:"id";s:1:"0";s:6:"levels";s:3:"999";s:6:"tables";a:24:{i:0;s:9:"be_groups";i:1;s:12:"sys_category";i:2;s:8:"sys_file";i:3;s:19:"sys_file_collection";i:4;s:17:"sys_file_metadata";i:5;s:18:"sys_file_reference";i:6;s:16:"sys_file_storage";i:7;s:14:"sys_filemounts";i:8;s:12:"sys_language";i:9;s:8:"sys_news";i:10;s:23:"tx_scheduler_task_group";i:11;s:14:"backend_layout";i:12;s:9:"fe_groups";i:13;s:8:"fe_users";i:14;s:12:"sys_template";i:15;s:10:"tt_content";i:16;s:17:"tx_impexp_presets";i:17;s:12:"sys_redirect";i:18;s:12:"index_config";i:19;s:13:"be_dashboards";i:20;s:42:"tx_extensionmanager_domain_model_extension";i:21;s:8:"sys_note";i:22;s:17:"tx_examples_dummy";i:23;s:17:"tx_examples_haiku";}}s:12:"external_ref";a:1:{s:6:"tables";s:0:"";}s:15:"external_static";a:1:{s:6:"tables";s:0:"";}s:19:"showStaticRelations";s:1:"1";s:7:"exclude";a:2:{s:10:"sys_file:2";s:1:"1";s:19:"sys_file_metadata:2";s:1:"1";}s:15:"excludeDisabled";s:1:"1";s:20:"download_export_name";s:14:"tree_PID0_L999";s:6:"preset";a:2:{s:5:"title";s:22:"Examples Export Preset";s:6:"public";i:1;}s:4:"meta";a:3:{s:5:"title";s:22:"Examples Export Preset";s:11:"description";s:74:"Use it to export the page tree repeatedly during EXT:examples development.";s:5:"notes";s:0:"";}s:8:"filetype";s:3:"xml";s:8:"filename";s:8:"data.xml";s:24:"excludeHTMLfileResources";s:0:"";s:26:"saveFilesOutsideExportFile";s:1:"1";s:13:"extension_dep";s:0:"";s:10:"softrefCfg";a:2:{s:32:"c1e48e4548f2b5eb88a3e220d3a8b238";a:1:{s:4:"mode";s:0:"";}s:32:"81b8b33df54ef433f1cbc7c3e513e6c4";a:1:{s:4:"mode";s:0:"";}}} + + + + + + 1 + 0 + 1624911429 + 1624911429 + 1 + 0 + 0 + 0 + 0 + 7e0594529428516bb312af3a9a8264f64f708a02 + My dashboard + {"e306fb8766abd17f48bd8681f9e9bec08027bdaa":{"identifier":"t3information"},"da0c111714ca66391a7483d09b2148756c1cd887":{"identifier":"t3news"},"904d24909d449f247f04b2f25c44bdccb98453a3":{"identifier":"docGettingStarted"}} @@ -277,8 +509,8 @@ 1 0 - 1622831287 - 1622714717 + 1624911436 + 1624911436 1 0 0 @@ -299,7 +531,7 @@ 0 0 1 - 1 + 0 31 27 0 @@ -353,19 +585,78 @@ 0.5 - 0 + 0
    - + 1 + 1 + 1624911436 + 1624911436 + 1 + 0 + 0 + 0 + 0 + + {"link":""} + 0 + 0 + 0 + 0 + 1 + 2 + tt_content + image + 1 + sys_file + Contribution Workflow + + Contribution Workflow + https://typo3.org/community/teams/documentation + {"default":{"cropArea":{"x":0,"y":0,"width":1,"height":1},"selectedRatio":"NaN","focusArea":null}} + 0 + + + + db + + + 1 + sys_file
    +
    +
    +
    + + + + + + https://typo3.org/community/teams/documentation + + external + c1e48e4548f2b5eb88a3e220d3a8b238 + https://typo3.org/community/teams/documentation + + + + + {softref:c1e48e4548f2b5eb88a3e220d3a8b238} + + +
    +
    + + + 2 1 - 1622714717 - 1622714717 + 1624911436 + 1624911436 1 0 0 @@ -435,53 +726,210 @@ 0 0 1 + 0 0 , 0 + + + + db + + + 1 + sys_file_reference
    +
    +
    +
    + + + + + + https://typo3.org/community/teams/documentation + + external + 81b8b33df54ef433f1cbc7c3e513e6c4 + https://typo3.org/community/teams/documentation + + + + + {softref:81b8b33df54ef433f1cbc7c3e513e6c4} + + +
    +
    + + + 2 + 1 + 1624911436 + 1624911436 + 1 + 0 + 0 + 0 + 0 + + 256 + + 0 + 0 + 0 + 0 + + 0 + {"doktype":"","title":"","slug":"","backend_layout":"","backend_layout_next_level":"","module":"","media":"","tx_examples_related_pages":"","tsconfig_includes":"","TSconfig":"","hidden":"","editlock":"","categories":"","rowDescription":"","tx_examples_cats":""} + 0 + 0 + 0 + 0 + 1 + 0 + 31 + 27 + 0 + Frontend Users + /tca-reference-examples/frontend-users + 254 + + 0 + 0 + + 0 + 0 + + 0 + + 0 + 0 + + 0 + + 0 + + 0 + 0 + + fe_users + 0 + + + + 0 + 0 + 0 + 0 + 0 + 0 + + + + 86 + + 0 + 0 + + + 0 + + + 0 + summary + + 0.5 + 0 + + 0 + + + + + + 1 + 2 + 1624911436 + 1624911436 + 1 + 0 + 0 + + 0 + Website Users + + + + + + + + + 1 + 2 + 1624911436 + 1624911436 + 1 + 0 + 0 + 0 + 0 + + 0 + example_user + $argon2i$v=19$m=65536,t=16,p=1$SEtoU0RrYnYwcy8wc3AzbA$3FQoX5YvlUbOMDUL4/Orez1BC+WALvvJKi60GR9neRs + 1 + + + + + + + + + + + + + + + + + + 0 + 0 + + + + 1 + - + db 1 - sys_file_reference
    + fe_groups
    - - - - - - https://typo3.org/community/teams/documentation - - external - 2487ce518ed56d22f20f259928ff43f1 - https://typo3.org/community/teams/documentation - - - - - {softref:2487ce518ed56d22f20f259928ff43f1} - -
    - + - 86 + 6 1 - 1622831296 - 1622831096 + 1624911540 + 1624911536 1 0 0 0 0 0 - 128 + 192 0 0 @@ -489,7 +937,7 @@ 0 0 - {"doktype":"","title":"","slug":"","backend_layout":"","backend_layout_next_level":"","module":"","media":"","tx_examples_related_pages":"","tsconfig_includes":"","TSconfig":"","hidden":"","editlock":"","categories":"","rowDescription":"","tx_examples_cats":""} + {"hidden":""} 0 0 0 @@ -499,9 +947,9 @@ 31 27 0 - Frontend Users - /tca-reference-examples/frontend-users - 254 + HMENU special userfunc + /hmenu-special-userfunc + 1 0 0 @@ -519,9 +967,9 @@ 0 0 - 0 + 1624911540 - fe_users + 0 @@ -549,96 +997,78 @@ 0.5 - 0 + 0 - + - 4 - 86 - 1622831437 - 1622831437 + 1 + 6 + 1624912267 + 1624911557 1 0 0 - - 0 - Website Users - - - - - - - - - 2 - 86 - 1622831552 - 1622831456 - 1 - 0 - 0 0 0 - - 0 - example_user - $argon2i$v=19$m=65536,t=16,p=1$SEtoU0RrYnYwcy8wc3AzbA$3FQoX5YvlUbOMDUL4/Orez1BC+WALvvJKi60GR9neRs - 4 - - - - - - - - - - - - - - - - 0 - - 0 - 0 - - - - 1 - + 256 + + 0 + 0 + 0 + 0 + 0 + NEW SITE + 1 + 3 + EXT:fluid_styled_content/Configuration/TypoScript/,EXT:fluid_styled_content/Configuration/TypoScript/Styling/,EXT:examples/Configuration/TypoScript/HmenuSpecial/ + + # Default PAGE object: +page = PAGE + +page.10 < lib.custommenu + + + 0 + 0 + 0 - - db - - - 4 - fe_groups
    -
    -
    + + + + + + EXT:fluid_styled_content/Configuration/TypoScript/ + + + EXT:fluid_styled_content/Configuration/TypoScript/Styling/ + + + EXT:examples/Configuration/TypoScript/HmenuSpecial/ + + + +
    - + - 2 + 3 1 - 1622831120 - 1622714977 + 1624911436 + 1624911436 1 0 0 0 0 - 0 - 64 + + 128 0 0 @@ -652,7 +1082,7 @@ 0 0 1 - 1 + 0 31 31 0 @@ -691,8 +1121,8 @@ 0 - - 0 + + 2 0 0 @@ -706,24 +1136,24 @@ 0.5 - 0 + 0 - + - 3 - 2 - 1622715144 - 1622714999 + 4 + 3 + 1624911436 + 1624911436 1 0 0 0 0 - 0 + 256 0 @@ -738,7 +1168,7 @@ 0 0 1 - 1 + 0 31 31 0 @@ -777,8 +1207,8 @@ 0 - - 0 + + 3 0 0 @@ -792,19 +1222,19 @@ 0.5 - 0 + 0 - + - 2 + 1 - 3 - 1622715140 - 1622715016 + 4 + 1624911436 + 1624911436 1 0 0 @@ -818,7 +1248,7 @@ 0 0 - {"CType":"","colPos":"","header":"","header_layout":"","header_position":"","date":"","header_link":"","subheader":"","list_type":"","pi_flexform":"","recursive":"","frame_class":"","space_before_class":"","space_after_class":"","background_color_class":"","background_image":"","background_image_options":"","sectionIndex":"","linkToTop":"","sys_language_uid":"","hidden":"","starttime":"","endtime":"","fe_group":"","tx_examples_noprint":"","editlock":"","categories":"","rowDescription":""} + {"pi_flexform":""} 0 0 0 @@ -842,7 +1272,7 @@ 0 - + 0 @@ -852,7 +1282,7 @@ examples_pi2 1 0 - + 0 @@ -866,7 +1296,7 @@ <sheet index="sDEF"> <language index="lDEF"> <field index="pageSelector"> - <value index="vDEF">3</value> + <value index="vDEF">4</value> </field> </language> </sheet> @@ -885,7 +1315,7 @@ 0 - + @@ -893,11 +1323,11 @@ 0 0 0 - 0 + 2 + 0 0 , 0 - 0 @@ -906,7 +1336,7 @@ - 3 + 4 pages
    @@ -916,173 +1346,11 @@
    - - - 1 - 1 - 1622714717 - 1622714717 - 1 - 0 - 0 - 0 - 0 - - {"link":""} - 0 - 0 - 0 - 0 - 1 - 1 - tt_content - image - 1 - sys_file - Contribution Workflow - - Contribution Workflow - https://typo3.org/community/teams/documentation - {"default":{"cropArea":{"x":0,"y":0,"width":1,"height":1},"selectedRatio":"NaN","focusArea":null}} - 0 - - - - db - - - 1 - sys_file
    -
    -
    -
    - - - - - - https://typo3.org/community/teams/documentation - - external - c1e48e4548f2b5eb88a3e220d3a8b238 - https://typo3.org/community/teams/documentation - - - - - {softref:c1e48e4548f2b5eb88a3e220d3a8b238} - - -
    -
    - - - 1 - 0 - 1622714721 - 0 - 0 - 1 - 2 - 0 - /examples/t3docs-collaboration.jpg - abed34f1672180294343569768f22a488fe0e7f6 - bb7825c9d34486c1e8c632a23b2b84932e7287e1 - jpg - image/jpeg - t3docs-collaboration.jpg - a93f3b195dcbf008d785e7cb2d8977d8c4d3b77e - 96187 - 1622714721 - 1622714721 - - - - db - - - 1 - sys_file_storage
    -
    -
    -
    - - db - - - 1 - sys_file_metadata
    -
    -
    -
    -
    -
    - - - 1 - 0 - 1622714717 - 1622547511 - 1 - 0 - 0 - - 0 - {"file":""} - 0 - 0 - 0 - 0 - 1 - - 1500 - 844 - - - 1 - - - - - - - - - - - - - 0.00000000000000 - 0.00000000000000 - 0 - 0 - 0 - - - 0 - - 0 - - - 0 - - - - db - - - 1 - sys_file
    -
    -
    -
    -
    -
    t3docs-collaboration.jpg - 1622714721 + 1624911438 a93f3b195dcbf008d785e7cb2d8977d8c4d3b77e