[FEATURE] Content elements based on Fluid 58/38258/79
authorPatrick Broens <patrick@patrickbroens.nl>
Mon, 20 Jul 2015 18:25:39 +0000 (20:25 +0200)
committerFrans Saris <franssaris@gmail.com>
Thu, 17 Sep 2015 20:12:30 +0000 (22:12 +0200)
This patch adds the new reworked content elements based on Fluid
templating instead of css_styled_content.

It also introduces a new CType "textmedia" which allows images,
but also media elements (videos etc) directly.

The content elements are added to the extension "fluid_styled_content".

Do not forget to include the static templates.

Change-Id: Ia0d0a9f9f2699d6bbff761c4896f9daa876f3b86
Resolves: #38732
Related: #65922
Releases: master
Reviewed-on: http://review.typo3.org/38258
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Sascha Egerer <sascha@sascha-egerer.de>
Tested-by: Sascha Egerer <sascha@sascha-egerer.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
70 files changed:
composer.json
typo3/sysext/backend/Resources/Private/Language/locallang_db_new_content_el.xlf
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/core/Documentation/Changelog/master/Feature-38732-Fluid-basedContentElementsIntroduced.rst [new file with mode: 0644]
typo3/sysext/core/ext_tables.php
typo3/sysext/fluid_styled_content/Classes/Hooks/TextmediaPreviewRenderer.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Link/ClickEnlargeViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/CategoriesViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/DirectoryViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/KeywordsViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/ListViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/MenuViewHelperTrait.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/SectionViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/UpdatedViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Configuration/PageTSconfig/NewContentElementWizard.ts [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/pages.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/sys_template.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/tt_content.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.fluidContent.ts [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.parseFunc.ts [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.stdheader.ts [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/styles.content.get.ts [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/constants.txt [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/setup.txt [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Configuration/TypoScript/Styling/setup.txt [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Language/Database.xlf [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Language/locallang.xlf [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Layouts/ContentFooter.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Layouts/HeaderContentFooter.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Layouts/HeaderFooter.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Footer.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Date.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Header.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/SubHeader.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/MediaGallery.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Directory.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-0.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-1.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-2.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-3.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-4.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-5.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-6.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-7.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-8.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-categorized_content.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-categorized_pages.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Table/Columns.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Bullets.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Default.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Div.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Header.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/HeaderOnly.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Html.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/List.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Menu.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Shortcut.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Table.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Textmedia.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Uploads.html [new file with mode: 0644]
typo3/sysext/fluid_styled_content/composer.json [new file with mode: 0644]
typo3/sysext/fluid_styled_content/ext_emconf.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/ext_icon.png [new file with mode: 0644]
typo3/sysext/fluid_styled_content/ext_localconf.php [new file with mode: 0644]
typo3/sysext/fluid_styled_content/ext_tables.sql [new file with mode: 0644]
typo3/sysext/frontend/Configuration/TCA/tt_content.php
typo3/sysext/frontend/Resources/Private/Language/locallang_ttc.xlf
typo3/sysext/t3skin/stylesheets/sprites/t3skin.css

index 6e0e734..25a0e34 100644 (file)
@@ -83,6 +83,7 @@
                "typo3/cms-filelist": "self.version",
                "typo3/cms-filemetadata": "self.version",
                "typo3/cms-fluid": "self.version",
+               "typo3/cms-fluid-styled-content": "self.version",
                "typo3/cms-form": "self.version",
                "typo3/cms-frontend": "self.version",
                "typo3/cms-func": "self.version",
                        "TYPO3\\CMS\\Felogin\\": "typo3/sysext/felogin/Classes/",
                        "TYPO3\\CMS\\Filelist\\": "typo3/sysext/filelist/Classes/",
                        "TYPO3\\CMS\\Fluid\\": "typo3/sysext/fluid/Classes/",
+                       "TYPO3\\CMS\\FluidStyledContent\\": "typo3/sysext/fluid_styled_content/Classes/",
                        "TYPO3\\CMS\\Form\\": "typo3/sysext/form/Classes/",
                        "TYPO3\\CMS\\Frontend\\": "typo3/sysext/frontend/Classes/",
                        "TYPO3\\CMS\\Func\\": "typo3/sysext/func/Classes/",
index 2fff2a7..906693c 100644 (file)
                        <trans-unit id="common_textImage_description">
                                <source>Any number of images wrapped right around a regular text element.</source>
                        </trans-unit>
+                       <trans-unit id="common_textMedia_title">
+                               <source>Text &amp; Media</source>
+                       </trans-unit>
+                       <trans-unit id="common_textMedia_description">
+                               <source>Any number of media wrapped right around a regular text element.</source>
+                       </trans-unit>
                        <trans-unit id="common_imagesOnly_title">
                                <source>Images Only</source>
                        </trans-unit>
index 76bf466..94362a5 100644 (file)
@@ -88,6 +88,7 @@ class ExtendedTemplateService extends TemplateService {
                'cheader_g' => array('Content: \'Header\', Graphical', 'ma'),
                'ctext' => array('Content: \'Text\'', 'mb'),
                'cimage' => array('Content: \'Image\'', 'md'),
+               'ctextmedia' => array('Content: \'Textmedia\'', 'ml'),
                'cbullets' => array('Content: \'Bullet list\'', 'me'),
                'ctable' => array('Content: \'Table\'', 'mf'),
                'cuploads' => array('Content: \'Filelinks\'', 'mg'),
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-38732-Fluid-basedContentElementsIntroduced.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-38732-Fluid-basedContentElementsIntroduced.rst
new file mode 100644 (file)
index 0000000..5245168
--- /dev/null
@@ -0,0 +1,32 @@
+=========================================================
+Feature: #38732 - Fluid-based Content Elements Introduced
+=========================================================
+
+Description
+===========
+
+A new system extension called "Fluid Styled Content" is added to the core, which ships with a trimmed down and
+simplified set of Content Elements which are rendered by Fluid Templates. This extension is installed by default on
+new installations.
+
+In order to have Fluid Styled Content running, add the TypoScript file inside the Template module, and the PageTSconfig
+file on the page properties.
+
+It is possible to overwrite the templates by adding your own paths in the TypoScript setup:
+
+.. code-block:: typoscript
+
+       lib.fluidContent.templateRootPaths.50 = EXT:site_example/Resources/Private/Templates/
+       lib.fluidContent.partialRootPaths.50 = EXT:site_example/Resources/Private/Partials/
+       lib.fluidContent.layoutRootPaths.50 = EXT:site_example/Resources/Private/Layouts/
+
+
+The new CType ``textmedia`` adds support for rendering media elements and image elements side by side.
+
+Impact
+======
+
+Please note that this extension is still experimental, and breaking changes are still possible until TYPO3 CMS 7 LTS,
+so be aware of changes to TCA, Templates, Behaviour and Feature set.
+
+Some conflicts regarding CSS Styled Content and Fluid Styled Content might still exist.
\ No newline at end of file
index 7c8ce23..bf6c5e2 100644 (file)
@@ -376,6 +376,7 @@ $GLOBALS['TBE_STYLES']['spriteIconApi']['coreSpriteImageNames'] = array(
        'mimetypes-x-content-template-static',
        'mimetypes-x-content-text',
        'mimetypes-x-content-text-picture',
+       'mimetypes-x-content-text-media',
        'mimetypes-x-sys_action',
        'mimetypes-x-sys_category',
        'mimetypes-x-sys_language',
diff --git a/typo3/sysext/fluid_styled_content/Classes/Hooks/TextmediaPreviewRenderer.php b/typo3/sysext/fluid_styled_content/Classes/Hooks/TextmediaPreviewRenderer.php
new file mode 100644 (file)
index 0000000..5cd241b
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+namespace TYPO3\CMS\FluidStyledContent\Hooks;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface;
+use TYPO3\CMS\Backend\View\PageLayoutView;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
+/**
+ * Contains a preview rendering for the page module of CType="textmedia"
+ */
+class TextmediaPreviewRenderer implements PageLayoutViewDrawItemHookInterface {
+
+       /**
+        * Preprocesses the preview rendering of a content element of type "textmedia"
+        *
+        * @param \TYPO3\CMS\Backend\View\PageLayoutView $parentObject Calling parent object
+        * @param bool $drawItem Whether to draw the item using the default functionality
+        * @param string $headerContent Header content
+        * @param string $itemContent Item content
+        * @param array $row Record row of tt_content
+        *
+        * @return void
+        */
+       public function preProcess(
+               PageLayoutView &$parentObject,
+               &$drawItem,
+               &$headerContent,
+               &$itemContent,
+               array &$row
+       ) {
+               if ($row['CType'] === 'textmedia') {
+                       if ($row['bodytext']) {
+                               $itemContent .= $parentObject->linkEditContent($parentObject->renderText($row['bodytext']), $row) . '<br />';
+                       }
+
+                       if ($row['media']) {
+                               $itemContent .= $parentObject->thumbCode($row, 'tt_content', 'media') . '<br />';
+
+                               $fileReferences = BackendUtility::resolveFileReferences('tt_content', 'media', $row);
+
+                               if (!empty($fileReferences)) {
+                                       $linkedContent = '';
+
+                                       foreach ($fileReferences as $fileReference) {
+                                               $linkedContent .= htmlspecialchars($fileReference->getDescription()) . '<br />';
+                                       }
+
+                                       $itemContent .= $parentObject->linkEditContent($linkedContent, $row);
+
+                                       unset($linkedContent);
+                               }
+                       }
+
+                       $drawItem = FALSE;
+               }
+       }
+}
diff --git a/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Link/ClickEnlargeViewHelper.php b/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Link/ClickEnlargeViewHelper.php
new file mode 100644 (file)
index 0000000..a568089
--- /dev/null
@@ -0,0 +1,85 @@
+<?php
+namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Link;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
+use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
+use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
+
+/**
+ * A view helper for creating a link for an image popup.
+ *
+ * = Example =
+ *
+ * <code title="enlarge image on click">
+ * <ce:link.clickEnlarge image="{image}" configuration="{settings.images.popup}"><img src=""></ce:link.clickEnlarge>
+ * </code>
+ *
+ * <output>
+ * <a href="url" onclick="javascript" target="thePicture"><img src=""></a>
+ * </output>
+ */
+class ClickEnlargeViewHelper extends AbstractViewHelper {
+
+       /**
+        * Initialize ViewHelper arguments
+        *
+        * @return void
+        */
+       public function initializeArguments() {
+               $this->registerArgument('image', '', 'The original image file', TRUE);
+               $this->registerArgument(
+                       'configuration',
+                       'mixed',
+                       'String, \TYPO3\CMS\Core\Resource\File or \TYPO3\CMS\Core\Resource\FileReference with link configuration',
+                       TRUE
+               );
+       }
+
+       /**
+        * Render the view helper
+        *
+        * @return string
+        */
+       public function render() {
+               return self::renderStatic(
+                       $this->arguments,
+                       $this->buildRenderChildrenClosure(),
+                       $this->renderingContext
+               );
+       }
+
+       /**
+        * @param array $arguments
+        * @param \Closure $renderChildrenClosure
+        * @param RenderingContextInterface $renderingContext
+        * @return string
+        */
+       static public function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) {
+               $image = $arguments['image'];
+               $configuration = $arguments['configuration'];
+               $content = $renderChildrenClosure();
+               $configuration['enable'] = TRUE;
+
+               return self::getContentObjectRenderer()->imageLinkWrap($content, $image, $configuration);
+       }
+
+       /**
+        * @return ContentObjectRenderer
+        */
+       static protected function getContentObjectRenderer() {
+               return $GLOBALS['TSFE']->cObj;
+       }
+}
diff --git a/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/CategoriesViewHelper.php b/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/CategoriesViewHelper.php
new file mode 100644 (file)
index 0000000..9ffc63d
--- /dev/null
@@ -0,0 +1,104 @@
+<?php
+namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
+use TYPO3\CMS\Frontend\Category\Collection\CategoryCollection;
+use TYPO3\CMS\Fluid\Core\ViewHelper\Exception;
+
+/**
+ * A view helper which returns records with assigned categories
+ *
+ * = Example =
+ *
+ * <code title="Pages with categories 1 and 2 assigned">
+ * <ce:menu.categories categoryUids="{0: 1, 1: 2}" as="pages" relationField="categories" table="pages">
+ *   <f:for each="{pages}" as="page">
+ *     {page.title}
+ *   </f:for>
+ * </ce:menu.categories>
+ * </code>
+ *
+ * <output>
+ * Page with category 1 assigned
+ * Page with category 1 and 2 assigned
+ * </output>
+ */
+class CategoriesViewHelper extends AbstractViewHelper {
+
+       use MenuViewHelperTrait;
+
+       /**
+        * Initialize ViewHelper arguments
+        *
+        * @return void
+        */
+       public function initializeArguments() {
+               $this->registerArgument('categoryUids', 'array', 'The categories assigned', TRUE);
+               $this->registerArgument('as', 'string', 'Name of the template variable that will contain resolved pages', TRUE);
+               $this->registerArgument('relationField', 'string', 'The category field for MM relation table', TRUE);
+               $this->registerArgument('table', 'string', 'The table to which categories are assigned (source table)', TRUE);
+       }
+
+       /**
+        * Render the view helper
+        *
+        * @return string
+        */
+       public function render() {
+               $categoryUids = (array)$this->arguments['categoryUids'];
+               $as = (string)$this->arguments['as'];
+               if (empty($categoryUids)) {
+                       return '';
+               }
+
+               return $this->renderChildrenWithVariables(array(
+                       $as => $this->findByCategories($categoryUids, $this->arguments['relationField'], $this->arguments['table'])
+               ));
+       }
+
+       /**
+        * Find records from a certain table which have categories assigned
+        *
+        * @param array $categoryUids The uids of the categories
+        * @param string $relationField Field relation in MM table
+        * @param string $tableName Name of the table to search in
+        * @return array
+        * @throws Exception
+        */
+       protected function findByCategories($categoryUids, $relationField, $tableName = 'pages') {
+               $result = array();
+
+               foreach ($categoryUids as $categoryUid) {
+                       try {
+                               $collection = CategoryCollection::load(
+                                       $categoryUid,
+                                       TRUE,
+                                       $tableName,
+                                       $relationField
+                               );
+                               if ($collection->count() > 0) {
+                                       foreach ($collection as $record) {
+                                               $result[$record['uid']] = $record;
+                                       }
+                               }
+                       } catch (\RuntimeException $e) {
+                               throw new Exception($e->getMessage());
+                       }
+               }
+
+               return $result;
+       }
+}
diff --git a/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/DirectoryViewHelper.php b/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/DirectoryViewHelper.php
new file mode 100644 (file)
index 0000000..dba4479
--- /dev/null
@@ -0,0 +1,114 @@
+<?php
+namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
+
+/**
+ * A view helper which returns the subpages of the given pages
+ *
+ * = Example =
+ *
+ * <code title="Directory of pages with uid = 1 and uid = 2">
+ * <ce:menu.directory pageUids="{0: 1, 1: 2}" as="pages">
+ *   <f:for each="{pages}" as="page">
+ *     {page.title}
+ *   </f:for>
+ * </ce:menu.directory>
+ * </code>
+ *
+ * <output>
+ * Subpage 1 of page with uid = 1
+ * Subpage 2 of page with uid = 1
+ * Subpage 1 of page with uid = 2
+ * </output>
+ */
+class DirectoryViewHelper extends AbstractViewHelper {
+
+       use MenuViewHelperTrait;
+
+       /**
+        * Initialize ViewHelper arguments
+        *
+        * @return void
+        */
+       public function initializeArguments() {
+               $this->registerArgument('as', 'string', 'Name of template variable which will contain selected pages', TRUE);
+               $this->registerArgument('levelAs', 'string', 'Name of template variable which will contain current level', FALSE, NULL);
+               $this->registerArgument('pageUids', 'array', 'Page UIDs of parent pages', FALSE, array());
+               $this->registerArgument('entryLevel', 'integer', 'The entry level', FALSE, NULL);
+               $this->registerArgument('maximumLevel', 'integer', 'Maximum level for rendering of nested menus', FALSE, 10);
+               $this->registerArgument('includeNotInMenu', 'boolean', 'Include pages that are marked "hide in menu"?', FALSE, FALSE);
+               $this->registerArgument('includeMenuSeparator', 'boolean', 'Include pages of the type "Menu separator"?', FALSE, FALSE);
+       }
+
+       /**
+        * Render the view helper
+        *
+        * @return string
+        */
+       public function render() {
+
+               $typoScriptFrontendController = $this->getTypoScriptFrontendController();
+               $as = $this->arguments['as'];
+               $pageUids = (array)$this->arguments['pageUids'];
+               $entryLevel = $this->arguments['entryLevel'];
+               $levelAs = $this->arguments['levelAs'];
+               $maximumLevel = $this->arguments['maximumLevel'];
+               $includeNotInMenu = (bool)$this->arguments['includeNotInMenu'];
+               $includeMenuSeparator = (bool)$this->arguments['includeMenuSeparator'];
+
+               $pageUids = $this->getPageUids($pageUids, $entryLevel);
+               $pages = $typoScriptFrontendController->sys_page->getMenu(
+                       $pageUids,
+                       '*',
+                       'sorting',
+                       $this->getPageConstraints($includeNotInMenu, $includeMenuSeparator)
+               );
+
+               $output = '';
+
+               if (!empty($pages)) {
+
+                       if (!$typoScriptFrontendController->register['ceMenuLevel_directory']) {
+                               $typoScriptFrontendController->register['ceMenuLevel_directory'] = 1;
+                               $typoScriptFrontendController->register['ceMenuMaximumLevel_directory'] = $maximumLevel;
+                       } else {
+                               $typoScriptFrontendController->register['ceMenuLevel_directory']++;
+                       }
+
+                       if ($typoScriptFrontendController->register['ceMenuLevel_directory'] > $typoScriptFrontendController->register['ceMenuMaximumLevel_directory']) {
+                               return '';
+                       }
+
+                       $variables = array(
+                               $as => $pages
+                       );
+                       if (!empty($levelAs)) {
+                               $variables[$levelAs] = $typoScriptFrontendController->register['ceMenuLevel'];
+                       }
+                       $output = $this->renderChildrenWithVariables($variables);
+
+                       $typoScriptFrontendController->register['ceMenuLevel_directory']--;
+
+                       if ($typoScriptFrontendController->register['ceMenuLevel_directory'] === 0) {
+                               unset($typoScriptFrontendController->register['ceMenuLevel_directory']);
+                               unset($typoScriptFrontendController->register['ceMenuMaximumLevel_directory']);
+                       }
+               }
+
+               return $output;
+       }
+}
diff --git a/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/KeywordsViewHelper.php b/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/KeywordsViewHelper.php
new file mode 100644 (file)
index 0000000..b81e3e6
--- /dev/null
@@ -0,0 +1,157 @@
+<?php
+namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+use TYPO3\CMS\Core\Database\DatabaseConnection;
+use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
+
+/**
+ * A view helper which returns pages with one of the same keywords as the given pages
+ *
+ * Search default starts at the root of the current page tree.
+ * With entryLevel this can be adjusted.
+ *
+ * = Example =
+ *
+ * <code title="Pages with the similar keyword(s) of page uid = 1 and uid = 2">
+ * <ce:menu.keywords pageUids="{0: 1, 1: 2}" as="pages">
+ *   <f:for each="{pages}" as="page">
+ *     {page.title}
+ *   </f:for>
+ * </ce:menu.keywords>
+ * </code>
+ *
+ * <output>
+ * Page with the keywords "typo3" and "fluid"
+ * Page with the keyword "fluid"
+ * Page with the keyword "typo3"
+ * </output>
+ */
+class KeywordsViewHelper extends AbstractViewHelper {
+
+       use MenuViewHelperTrait;
+
+       /**
+        * Initialize ViewHelper arguments
+        *
+        * @return void
+        */
+       public function initializeArguments() {
+               $this->registerArgument('as', 'string', 'Name of template variable which will contain selected pages', TRUE);
+               $this->registerArgument('entryLevel', 'integer', 'The entry level', FALSE, 0);
+               $this->registerArgument('pageUids', 'array', 'Page UIDs of pages to fetch the keywords from', FALSE, array());
+               $this->registerArgument('keywords', 'array', 'Keywords for which to search', FALSE, array());
+               $this->registerArgument('includeNotInMenu', 'boolean', 'Include pages that are marked "hide in menu"?', FALSE, FALSE);
+               $this->registerArgument('includeMenuSeparator', 'boolean', 'Include pages of the type "Menu separator"?', FALSE, FALSE);
+               $this->registerArgument('excludeNoSearchPages', 'boolean', 'Exclude pages that are NOT marked "include in search"?', FALSE, TRUE);
+       }
+
+       /**
+        * Render the view helper
+        *
+        * @return string
+        */
+       public function render() {
+
+               $typoScriptFrontendController = $this->getTypoScriptFrontendController();
+               $as = (string)$this->arguments['as'];
+               $entryLevel = (int)$this->arguments['entryLevel'];
+               $pageUids = (array)$this->arguments['pageUids'];
+               $keywords = (array)$this->arguments['keywords'];
+               $includeNotInMenu = (bool)$this->arguments['includeNotInMenu'];
+               $includeMenuSeparator = (bool)$this->arguments['includeMenuSeparator'];
+               $excludeNoSearchPages = (bool)$this->arguments['excludeNoSearchPages'];
+
+               // If no pages have been defined, use the current page
+               if (empty($pageUids)) {
+                       $pageUids = array($typoScriptFrontendController->page['uid']);
+               }
+
+               // Transform the keywords list into an array
+               if (!is_array($keywords)) {
+                       $unfilteredKeywords = $this->keywordsToArray($keywords);
+               } else {
+                       $unfilteredKeywords = $keywords;
+               }
+
+               // Use the keywords of the page when none has been given
+               if (empty($keywords)) {
+                       foreach ($pageUids as $pageUid) {
+                               $page = $typoScriptFrontendController->sys_page->getPage($pageUid);
+                               $unfilteredKeywords = array_merge(
+                                       $unfilteredKeywords,
+                                       $this->keywordsToArray($page['keywords'])
+                               );
+                       }
+               }
+               $filteredKeywords = array_unique($unfilteredKeywords);
+
+               $constraints = $this->getPageConstraints($includeNotInMenu, $includeMenuSeparator);
+               if ($excludeNoSearchPages) {
+                       $constraints .= ' AND no_search = 0';
+               }
+
+               $keywordConstraints = array();
+               if ($filteredKeywords) {
+                       $db = $this->getDatabaseConnection();
+                       foreach ($filteredKeywords as $keyword) {
+                               $keyword = $db->fullQuoteStr('%' . $db->escapeStrForLike($keyword, 'pages') . '%', 'pages');
+                               $keywordConstraints[] = 'keywords LIKE ' . $keyword;
+                       }
+                       $constraints .= ' AND (' . implode(' OR ', $keywordConstraints) . ')';
+               }
+
+               // Start point
+               if ($entryLevel < 0) {
+                       $entryLevel = count($typoScriptFrontendController->tmpl->rootLine) - 1 + $entryLevel;
+               }
+               $startUid = $typoScriptFrontendController->tmpl->rootLine[$entryLevel]['uid'];
+               $treePageUids = explode(
+                       ',',
+                       $typoScriptFrontendController->cObj->getTreeList($startUid, 20)
+               );
+
+               $pages = $typoScriptFrontendController->sys_page->getMenuForPages(
+                       array_merge([$startUid], $treePageUids),
+                       '*',
+                       '',
+                       $constraints
+               );
+               return $this->renderChildrenWithVariables(array(
+                       $as => $pages
+               ));
+       }
+
+       /**
+        * Get a clean array of keywords
+        *
+        * The list of keywords can have a separator like comma, semicolon or line feed
+        *
+        * @param string $keywords The list of keywords
+        * @return array Cleaned up list
+        */
+       protected function keywordsToArray($keywords) {
+               $keywordList = preg_split('/[,;' . LF . ']/', $keywords);
+
+               return array_filter(array_map('trim', $keywordList));
+       }
+
+       /**
+        * @return DatabaseConnection
+        */
+       protected function getDatabaseConnection() {
+               return $GLOBALS['TYPO3_DB'];
+       }
+
+}
diff --git a/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/ListViewHelper.php b/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/ListViewHelper.php
new file mode 100644 (file)
index 0000000..d1759f4
--- /dev/null
@@ -0,0 +1,111 @@
+<?php
+namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
+
+/**
+ * A view helper which returns a list of pages
+ *
+ * = Example =
+ *
+ * <code title="List of pages with uid = 1 and uid = 2">
+ * <ce:menu.list pageUids="{0: 1, 1: 2}" as="pages">
+ *   <f:for each="{pages}" as="page">
+ *     {page.title}
+ *   </f:for>
+ * </ce:menu.list>
+ * </code>
+ *
+ * <output>
+ * Page with uid = 1
+ * Page with uid = 2
+ * </output>
+ */
+class ListViewHelper extends AbstractViewHelper {
+
+       use MenuViewHelperTrait;
+
+       /**
+        * Initialize ViewHelper arguments
+        */
+       public function initializeArguments() {
+               $this->registerArgument('as', 'string', 'Name of template variable which will contain selected pages', TRUE);
+               $this->registerArgument('levelAs', 'string', 'Name of template variable which will contain current level', FALSE, NULL);
+               $this->registerArgument('pageUids', 'array', 'Page UIDs of parent pages', FALSE, array());
+               $this->registerArgument('entryLevel', 'integer', 'The entry level', FALSE, NULL);
+               $this->registerArgument('maximumLevel', 'integer', 'Maximum level for rendering of nested menus', FALSE, 10);
+               $this->registerArgument('includeNotInMenu', 'boolean', 'Include pages that are marked "hide in menu"?', FALSE, FALSE);
+               $this->registerArgument('includeMenuSeparator', 'boolean', 'Include pages of the type "Menu separator"?', FALSE, FALSE);
+       }
+
+       /**
+        * Render the view helper
+        *
+        * @return string
+        * @throws \TYPO3\CMS\Fluid\Core\ViewHelper\Exception
+        */
+       public function render() {
+
+               $typoScriptFrontendController = $this->getTypoScriptFrontendController();
+               $as = $this->arguments['as'];
+               $pageUids = (array)$this->arguments['pageUids'];
+               $entryLevel = $this->arguments['entryLevel'];
+               $levelAs = $this->arguments['levelAs'];
+               $maximumLevel = $this->arguments['maximumLevel'];
+               $includeNotInMenu = (bool)$this->arguments['includeNotInMenu'];
+               $includeMenuSeparator = (bool)$this->arguments['includeMenuSeparator'];
+
+               $pageUids = $this->getPageUids($pageUids, $entryLevel);
+               $pages = $typoScriptFrontendController->sys_page->getMenuForPages(
+                       $pageUids,
+                       '*',
+                       '',
+                       $this->getPageConstraints($includeNotInMenu, $includeMenuSeparator)
+               );
+
+               $output = '';
+
+               if (!empty($pages)) {
+
+                       if (!$typoScriptFrontendController->register['ceMenuLevel_list']) {
+                               $typoScriptFrontendController->register['ceMenuLevel_list'] = 1;
+                               $typoScriptFrontendController->register['ceMenuMaximumLevel_list'] = $maximumLevel;
+                       } else {
+                               $typoScriptFrontendController->register['ceMenuLevel_list']++;
+                       }
+
+                       if ($typoScriptFrontendController->register['ceMenuLevel_list'] > $typoScriptFrontendController->register['ceMenuMaximumLevel_list']) {
+                               return '';
+                       }
+
+                       $variables = array(
+                               $as => $pages
+                       );
+                       if (!empty($levelAs)) {
+                               $variables[$levelAs] = $typoScriptFrontendController->register['ceMenuLevel_list'];
+                       }
+                       $output = $this->renderChildrenWithVariables($variables);
+
+                       $typoScriptFrontendController->register['ceMenuLevel_list']--;
+
+                       if ($typoScriptFrontendController->register['ceMenuLevel_list'] === 0) {
+                               unset($typoScriptFrontendController->register['ceMenuLevel_list']);
+                               unset($typoScriptFrontendController->register['ceMenuMaximumLevel_list']);
+                       }
+               }
+
+               return $output;
+       }
+}
diff --git a/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/MenuViewHelperTrait.php b/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/MenuViewHelperTrait.php
new file mode 100644 (file)
index 0000000..288684d
--- /dev/null
@@ -0,0 +1,113 @@
+<?php
+namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+use TYPO3\CMS\Frontend\Page\PageRepository;
+
+/**
+ * Trait for Menu-ViewHelpers that require support functions for
+ * working with menus that require page selection constraints.
+ */
+trait MenuViewHelperTrait {
+
+       /**
+        * Get the constraints for the page based on doktype and field "nav_hide"
+        *
+        * By default the following doktypes are always ignored:
+        * - 6: Backend User Section
+        * - > 200: Folder (254)
+        *          Recycler (255)
+        *
+        * Optional are:
+        * - 199: Menu separator
+        * - nav_hide: Not in menu
+        *
+        * @param bool $includeNotInMenu Should pages which are hidden for menu's be included
+        * @param bool $includeMenuSeparator Should pages of type "Menu separator" be included
+        * @return string
+        */
+       protected function getPageConstraints($includeNotInMenu = FALSE, $includeMenuSeparator = FALSE) {
+               $constraints = array();
+
+               $constraints[] = 'doktype NOT IN (' . PageRepository::DOKTYPE_BE_USER_SECTION . ',' . PageRepository::DOKTYPE_RECYCLER . ',' . PageRepository::DOKTYPE_SYSFOLDER . ')';
+
+               if (!$includeNotInMenu) {
+                       $constraints[] = 'nav_hide = 0';
+               }
+
+               if (!$includeMenuSeparator) {
+                       $constraints[] = 'doktype != ' . PageRepository::DOKTYPE_SPACER;
+               }
+
+               return 'AND ' . implode(' AND ', $constraints);
+       }
+
+       /**
+        * Get a filtered list of page UIDs according to initial list
+        * of UIDs and entryLevel parameter.
+        *
+        * @param array $pageUids
+        * @param int|NULL $entryLevel
+        * @return array
+        */
+       protected function getPageUids(array $pageUids, $entryLevel = 0) {
+
+               $typoScriptFrontendController = $this->getTypoScriptFrontendController();
+
+               // Remove empty entries from array
+               $pageUids = array_filter($pageUids);
+
+               // If no pages have been defined, use the current page
+               if (empty($pageUids)) {
+                       if ($entryLevel !== NULL) {
+                               if ($entryLevel < 0) {
+                                       $entryLevel = count($typoScriptFrontendController->tmpl->rootLine) - 1 + $entryLevel;
+                               }
+                               $pageUids = array($typoScriptFrontendController->tmpl->rootLine[$entryLevel]['uid']);
+                       } else {
+                               $pageUids = array($typoScriptFrontendController->id);
+                       }
+               }
+
+               return $pageUids;
+       }
+
+       /**
+        * @param array $variables
+        * @return mixed
+        */
+       protected function renderChildrenWithVariables(array $variables) {
+
+               foreach ($variables as $name => $value) {
+                       $this->templateVariableContainer->add($name, $value);
+               }
+
+               $output = $this->renderChildren();
+
+               foreach ($variables as $name => $_) {
+                       $this->templateVariableContainer->remove($name);
+               }
+
+               return $output;
+       }
+
+       /**
+        * @return TypoScriptFrontendController
+        */
+       protected function getTypoScriptFrontendController() {
+               return $GLOBALS['TSFE'];
+       }
+}
diff --git a/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/SectionViewHelper.php b/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/SectionViewHelper.php
new file mode 100644 (file)
index 0000000..03746cd
--- /dev/null
@@ -0,0 +1,135 @@
+<?php
+namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
+use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+/**
+ * A view helper which returns content elements with 'Show in Section Menus' enabled
+ *
+ * By default only content in colPos=0 will be found. This can be overruled by using "column"
+ *
+ * If you set property "type" to 'all', then the 'Show in Section Menus' checkbox is not considered
+ * and all content elements are selected.
+ *
+ * If the property "type" is 'header' then only content elements with a visible header layout
+ * (and a non-empty 'header' field!) are selected.
+ * In other words, if the header layout of an element is set to 'Hidden' then the element will not be in the results.
+ *
+ * = Example =
+ *
+ * <code title="Content elements in page with uid = 1 and 'Show in Section Menu's' enabled">
+ * <ce:menu.section pageUid="1" as="contentElements">
+ *   <f:for each="{contentElements}" as="contentElement">
+ *     {contentElement.header}
+ *   </f:for>
+ * </ce:menu.section>
+ * </code>
+ *
+ * <output>
+ * Content element 1 in page with uid = 1 and "Show in section menu's" enabled
+ * Content element 2 in page with uid = 1 and "Show in section menu's" enabled
+ * Content element 3 in page with uid = 1 and "Show in section menu's" enabled
+ * </output>
+ */
+class SectionViewHelper extends AbstractViewHelper {
+
+       use MenuViewHelperTrait;
+
+       /**
+        * Initialize ViewHelper arguments
+        *
+        * @return void
+        */
+       public function initializeArguments() {
+               $this->registerArgument('as', 'string', 'Name of the template variable that will contain selected pages', TRUE);
+               $this->registerArgument('column', 'integer', 'Column number (colPos) from which to select content', FALSE, 0);
+               $this->registerArgument('pageUid', 'integer', 'UID of page containing section-objects; defaults to current page', FALSE, NULL);
+               $this->registerArgument('type', 'string', 'Search method when selecting indices from page', FALSE, '');
+       }
+
+       /**
+        * Render the view helper
+        *
+        * @return string
+        */
+       public function render() {
+
+               $as = (string)$this->arguments['as'];
+               $pageUid = (int)$this->arguments['pageUid'];
+               $type = (string)$this->arguments['type'];
+
+               if (empty($pageUid)) {
+                       $pageUid = $this->getTypoScriptFrontendController()->id;
+               }
+
+               if (!empty($type) && !in_array($type, array('all', 'header'), TRUE)) {
+                       return '';
+               }
+
+               return $this->renderChildrenWithVariables(array(
+                       $as => $this->findBySection($pageUid, $type, (int)$this->arguments['column'])
+               ));
+       }
+
+       /**
+        * Find content with 'Show in Section Menus' enabled in a page
+        *
+        * By default only content in colPos=0 will be found. This can be overruled by using $column
+        *
+        * If you set property type to "all", then the 'Show in Section Menus' checkbox is not considered
+        * and all content elements are selected.
+        *
+        * If the property $type is 'header' then only content elements with a visible header layout
+        * (and a non-empty 'header' field!) is selected.
+        * In other words, if the header layout of an element is set to 'Hidden' then the page will not appear in the menu.
+        *
+        * @param int $pageUid The page uid
+        * @param string $type Search method
+        * @param int $column Restrict content by the column number
+        * @return array
+        */
+       protected function findBySection($pageUid, $type = '', $column = 0) {
+               $constraints = array(
+                       'colPos = ' . (int)$column
+               );
+
+               switch ($type) {
+                       case 'all':
+                               break;
+                       case 'header':
+                               $constraints[] = 'sectionIndex = 1';
+                               $constraints[] = 'header <> \'\'';
+                               $constraints[] = 'header_layout <> 100';
+                               break;
+                       default:
+                               $constraints[] = 'sectionIndex = 1';
+               }
+
+               $whereStatement = implode(' AND ', $constraints);
+
+               $contentElements = $this->getTypoScriptFrontendController()->cObj->getRecords('tt_content', [
+                       'where' => $whereStatement,
+                       'orderBy' => 'sorting',
+                       'languageField = sys_language_uid',
+                       'pidInList' => (int)$pageUid
+               ]);
+
+               return $contentElements;
+       }
+
+}
diff --git a/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/UpdatedViewHelper.php b/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Menu/UpdatedViewHelper.php
new file mode 100644 (file)
index 0000000..acc5527
--- /dev/null
@@ -0,0 +1,113 @@
+<?php
+namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
+
+/**
+ * A view helper which returns recently updated subpages (multiple levels) of the given pages
+ *
+ * = Example =
+ *
+ * <code title="Pages with the similar keyword(s) of page uid = 1 and uid = 2">
+ * <ce:menu.updated pageUids="{0: 1, 1: 2}" as="pages">
+ *   <f:for each="{pages}" as="page">
+ *     {page.title}
+ *   </f:for>
+ * </ce:menu.updated>
+ * </code>
+ *
+ * <output>
+ * Recently updated subpage 1
+ * Recently updated subpage 2
+ * Recently updated subpage 3
+ * </output>
+ */
+class UpdatedViewHelper extends AbstractViewHelper {
+
+       use MenuViewHelperTrait;
+
+       /**
+        * Initialize ViewHelper arguments
+        *
+        * @return void
+        */
+       public function initializeArguments() {
+               $this->registerArgument('as', 'string', 'Name of the template variable that will contain selected pages', TRUE);
+               $this->registerArgument('pageUids', 'array', 'Page UIDs of parent pages', FALSE, array());
+               $this->registerArgument('sortField', 'string', 'Field to sort pages; possible values: starttime, lastUpdated, tstamp, crdate', FALSE, 'SYS_LASTCHANGED');
+               $this->registerArgument('maximumAge', 'string', 'Maximum age of pages to be included; supports mathematical expressions', FALSE, '604800');
+               $this->registerArgument('includeNotInMenu', 'boolean', 'Include pages that are marked "hide in menu"?', FALSE, FALSE);
+               $this->registerArgument('includeMenuSeparator', 'boolean', 'Include pages of the type "Menu separator"?', FALSE, FALSE);
+               $this->registerArgument('excludeNoSearchPages', 'boolean', 'Exclude pages that are NOT marked "include in search"?', FALSE, TRUE);
+       }
+
+       /**
+        * Render the view helper
+        *
+        * @return string
+        */
+       public function render() {
+
+               $typoScriptFrontendController = $this->getTypoScriptFrontendController();
+               $as = (string)$this->arguments['as'];
+               $pageUids = (array)$this->arguments['pageUids'];
+               $sortField = $this->arguments['sortField'];
+               $maximumAge = $this->arguments['maximumAge'];
+               $includeNotInMenu = (bool)$this->arguments['includeNotInMenu'];
+               $includeMenuSeparator = (bool)$this->arguments['includeMenuSeparator'];
+               $excludeNoSearchPages = (bool)$this->arguments['excludeNoSearchPages'];
+
+               // If no pages have been defined, use the current page
+               if (empty($pageUids)) {
+                       $pageUids = array($typoScriptFrontendController->page['uid']);
+               }
+
+               $unfilteredPageTreeUids = array();
+               foreach ($pageUids as $pageUid) {
+                       $unfilteredPageTreeUids = array_merge(
+                               $unfilteredPageTreeUids,
+                               explode(
+                                       ',',
+                                       $typoScriptFrontendController->cObj->getTreeList($pageUid, 20)
+                               )
+                       );
+               }
+               $pageTreeUids = array_unique($unfilteredPageTreeUids);
+
+               $constraints = $this->getPageConstraints($includeNotInMenu, $includeMenuSeparator);
+
+               if ($excludeNoSearchPages) {
+                       $constraints .= ' AND no_search = 0';
+               }
+
+               if (!in_array($sortField, ['starttime', 'lastUpdated', 'tstamp', 'crdate'])) {
+                       $sortField = 'SYS_LASTCHANGED';
+               }
+
+               $minimumTimeStamp = time() - (int)$typoScriptFrontendController->cObj->calc($maximumAge);
+               $constraints .= ' AND ' . $sortField . ' >=' . $minimumTimeStamp;
+
+               $pages = $typoScriptFrontendController->sys_page->getMenuForPages(
+                       $pageTreeUids,
+                       '*',
+                       $sortField . ' DESC',
+                       $constraints
+               );
+               return $this->renderChildrenWithVariables(array(
+                       $as => $pages
+               ));
+       }
+}
diff --git a/typo3/sysext/fluid_styled_content/Configuration/PageTSconfig/NewContentElementWizard.ts b/typo3/sysext/fluid_styled_content/Configuration/PageTSconfig/NewContentElementWizard.ts
new file mode 100644 (file)
index 0000000..716c505
--- /dev/null
@@ -0,0 +1,88 @@
+# *******************************************************
+# Define content elements in "New Content Element Wizard"
+# *******************************************************
+
+mod.wizards.newContentElement.wizardItems {
+       common.elements {
+               header {
+                       icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/regular_header.gif
+                       title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:common_headerOnly_title
+                       description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:common_headerOnly_description
+                       tt_content_defValues {
+                               CType = header
+                       }
+               }
+               textmedia {
+                       icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/text_image_right.gif
+                       title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:common_textMedia_title
+                       description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:common_textMedia_description
+                       tt_content_defValues {
+                               CType = textmedia
+                               imageorient = 17
+                       }
+               }
+               bullets {
+                       icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/bullet_list.gif
+                       title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:common_bulletList_title
+                       description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:common_bulletList_description
+                       tt_content_defValues {
+                               CType = bullets
+                       }
+               }
+               table {
+                       icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/table.gif
+                       title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:common_table_title
+                       description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:common_table_description
+                       tt_content_defValues {
+                               CType = table
+                       }
+               }
+               uploads {
+                       icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/filelinks.gif
+                       title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:special_filelinks_title
+                       description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:special_filelinks_description
+                       tt_content_defValues {
+                               CType = uploads
+                       }
+               }
+       }
+       common.show := addToList(header,textmedia,bullets,table,uploads)
+       common.show := removeFromList(text,textpic)
+
+       special.elements {
+               menu {
+                       icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/sitemap2.gif
+                       title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:special_menus_title
+                       description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:special_menus_description
+                       tt_content_defValues {
+                               CType = menu
+                               menu_type = 0
+                       }
+               }
+               html {
+                       icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/html.gif
+                       title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:special_plainHTML_title
+                       description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:special_plainHTML_description
+                       tt_content_defValues {
+                               CType = html
+                       }
+               }
+               div {
+                       icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/div.gif
+                       title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:special_divider_title
+                       description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:special_divider_description
+                       tt_content_defValues {
+                               CType = div
+                       }
+               }
+               shortcut {
+                       icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/shortcut.gif
+                       title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:special_shortcut_title
+                       description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:special_shortcut_description
+                       tt_content_defValues {
+                               CType = shortcut
+                       }
+               }
+       }
+       special.show := addToList(menu,html,div,shortcut)
+}
diff --git a/typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/pages.php b/typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/pages.php
new file mode 100644 (file)
index 0000000..cc9a86c
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+defined('TYPO3_MODE') or die();
+
+// Add pageTSconfig
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
+       'fluid_styled_content',
+       'Configuration/PageTSconfig/NewContentElementWizard.ts',
+       'Fluid-based Content Elements'
+);
diff --git a/typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/sys_template.php b/typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/sys_template.php
new file mode 100644 (file)
index 0000000..a758bbe
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+defined('TYPO3_MODE') or die();
+
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('fluid_styled_content', 'Configuration/TypoScript/Static/', 'Content Elements');
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('fluid_styled_content', 'Configuration/TypoScript/Styling/', 'Content Elements CSS (optional)');
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/tt_content.php b/typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/tt_content.php
new file mode 100644 (file)
index 0000000..4cfb6b1
--- /dev/null
@@ -0,0 +1,119 @@
+<?php
+defined('TYPO3_MODE') or die();
+
+call_user_func(function() {
+
+       $languageFilePrefix = 'LLL:EXT:fluid_styled_content/Resources/Private/Language/Database.xlf:';
+       $frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
+
+       // Add the CType "textmedia"
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
+               'tt_content',
+               'CType',
+               [
+                       $languageFilePrefix . 'tt_content.CType.textmedia',
+                       'textmedia',
+                       'EXT:t3skin/icons/gfx/i/tt_content_textpic.gif'
+               ],
+               'header',
+               'after'
+       );
+       $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['textmedia'] = 'mimetypes-x-content-text-media';
+       $GLOBALS['TCA']['tt_content']['palettes']['mediaAdjustments'] = [
+               'showitem' => '
+                       imagewidth;' . $languageFilePrefix . 'tt_content.palette.textmedia.imagewidth,
+                       imageheight;' . $languageFilePrefix . 'tt_content.palette.textmedia.imageheight,
+                       imageborder;' . $languageFilePrefix . 'tt_content.palette.textmedia.imageborder
+               '
+       ];
+       $GLOBALS['TCA']['tt_content']['palettes']['gallerySettings'] = [
+               'showitem' => '
+                       imageorient;' . $frontendLanguageFilePrefix . 'imageorient_formlabel,
+                       imagecols;' . $frontendLanguageFilePrefix . 'imagecols_formlabel
+               '
+       ];
+       $GLOBALS['TCA']['tt_content']['types']['textmedia'] = [
+               'showitem' => '
+                               --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
+                               --palette--;' . $frontendLanguageFilePrefix . 'palette.header;header,
+                               bodytext;' . $frontendLanguageFilePrefix . 'bodytext_formlabel;;richtext:rte_transform[mode=ts_css],
+                       --div--;' . $frontendLanguageFilePrefix . 'tabs.media,
+                               media,
+                               --palette--;' . $frontendLanguageFilePrefix . 'palette.imagelinks;imagelinks,
+                       --div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
+                               layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
+                               --palette--;' . $languageFilePrefix . 'tt_content.palette.mediaAdjustments;mediaAdjustments,
+                               --palette--;' . $languageFilePrefix . 'tt_content.palette.gallerySettings;gallerySettings,
+                               --palette--;' . $frontendLanguageFilePrefix . 'palette.appearanceLinks;appearanceLinks,
+                       --div--;' . $frontendLanguageFilePrefix . 'tabs.access,
+                               hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
+                               --palette--;' . $frontendLanguageFilePrefix . 'palette.access;access,
+                       --div--;' . $frontendLanguageFilePrefix . 'tabs.extended
+               ',
+               'columnsOverrides' => [
+                       'media' => [
+                               'label' => $languageFilePrefix . 'tt_content.media_references',
+                               'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media', [
+                                       'appearance' => [
+                                               'createNewRelationLinkTitle' => $languageFilePrefix . 'tt_content.media_references.addFileReference'
+                                       ],
+                                       // custom configuration for displaying fields in the overlay/reference table
+                                       // behaves the same as the image field.
+                                       'foreign_types' => $GLOBALS['TCA']['tt_content']['columns']['image']['config']['foreign_types']
+                               ], $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'])
+                       ]
+               ]
+       ];
+
+       // Add category tab when categories column exits
+       if (!empty($GLOBALS['TCA']['tt_content']['columns']['categories'])) {
+               $GLOBALS['TCA']['tt_content']['types']['textmedia']['showitem'] .=
+               ',--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,
+                               categories';
+       }
+
+       // Add additional fields for bullets + upload CTypes
+       $additionalColumns = [
+               'bullets_type' => [
+                       'exclude' => TRUE,
+                       'label' => $languageFilePrefix . 'tt_content.bullets_type',
+                       'config' => [
+                               'type' => 'select',
+                               'items' => [
+                                       [$languageFilePrefix . 'tt_content.bullets_type.0', 0],
+                                       [$languageFilePrefix . 'tt_content.bullets_type.1', 1],
+                                       [$languageFilePrefix . 'tt_content.bullets_type.2', 2]
+                               ],
+                               'default' => 0
+                       ]
+               ],
+               'uploads_description' => [
+                       'exclude' => TRUE,
+                       'label' => $languageFilePrefix . 'tt_content.uploads_description',
+                       'config' => [
+                               'type' => 'check',
+                               'default' => 0,
+                               'items' => [
+                                       ['LLL:EXT:lang/locallang_core.xml:labels.enabled', 1]
+                               ]
+                       ]
+               ],
+               'uploads_type' => [
+                       'exclude' => TRUE,
+                       'label' => $languageFilePrefix . 'tt_content.uploads_type',
+                       'config' => [
+                               'type' => 'select',
+                               'items' => [
+                                       [$languageFilePrefix . 'tt_content.uploads_type.0', 0],
+                                       [$languageFilePrefix . 'tt_content.uploads_type.1', 1],
+                                       [$languageFilePrefix . 'tt_content.uploads_type.2', 2]
+                               ],
+                               'default' => 0
+                       ]
+               ]
+       ];
+
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $additionalColumns);
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tt_content', 'bullets_type', 'bullets', 'after:layout');
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette('tt_content', 'uploadslayout', 'uploads_description,uploads_type');
+});
diff --git a/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.fluidContent.ts b/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.fluidContent.ts
new file mode 100644 (file)
index 0000000..d39d698
--- /dev/null
@@ -0,0 +1,45 @@
+# Default configuration for content elements which are using FLUIDTEMPLATE directly
+lib.fluidContent >
+lib.fluidContent = FLUIDTEMPLATE
+lib.fluidContent {
+       templateName = Default
+       templateRootPaths {
+               10 = {$styles.templates.templateRootPath}
+       }
+       partialRootPaths {
+               10 = {$styles.templates.partialRootPath}
+       }
+       layoutRootPaths {
+               10 = {$styles.templates.layoutRootPath}
+       }
+       settings {
+               defaultHeaderType = {$styles.content.defaultHeaderType}
+
+               media {
+                       gallery {
+                               columnSpacing = {$styles.content.textmedia.colSpace}
+                               maximumImageWidth = {$styles.content.textmedia.maxW}
+                               maximumImageWidthInText = {$styles.content.textmedia.maxWInText}
+                               borderWidth = {$styles.content.textmedia.borderThick}
+                               borderPadding = {$styles.content.textmedia.borderSpace}
+                       }
+                       popup {
+                               bodyTag = <body style="margin:0; background:#fff;">
+                               wrap = <a href="javascript:close();"> | </a>
+                               width = {$styles.content.textmedia.linkWrap.width}
+                               height = {$styles.content.textmedia.linkWrap.height}
+                               effects = {$styles.content.textmedia.linkWrap.effects}
+
+                               JSwindow = 1
+                               JSwindow {
+                                       newWindow = {$styles.content.textmedia.linkWrap.newWindow}
+                                       if.isFalse = {$styles.content.textmedia.linkWrap.lightboxEnabled}
+                               }
+
+                               directImageLink = {$styles.content.textmedia.linkWrap.lightboxEnabled}
+
+                               linkParams.ATagParams.dataWrap =  class="{$styles.content.textmedia.linkWrap.lightboxCssClass}" rel="{$styles.content.textmedia.linkWrap.lightboxRelAttribute}"
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.parseFunc.ts b/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.parseFunc.ts
new file mode 100644 (file)
index 0000000..899e2fa
--- /dev/null
@@ -0,0 +1,120 @@
+# Creates persistent ParseFunc setup for non-HTML content.
+lib.parseFunc {
+       makelinks = 1
+       makelinks {
+               http {
+                       keep = {$styles.content.links.keep}
+                       extTarget = {$styles.content.links.extTarget}
+               }
+               mailto {
+                       keep = path
+               }
+       }
+       tags {
+               link = TEXT
+               link {
+                       current = 1
+                       typolink {
+                               parameter.data = parameters : allParams
+                               extTarget = {$styles.content.links.extTarget}
+                               target = {$styles.content.links.target}
+                       }
+                       parseFunc.constants = 1
+               }
+       }
+       allowTags = {$styles.content.allowTags}
+       denyTags = *
+       sword = <span class="ce-sword">|</span>
+       constants = 1
+       nonTypoTagStdWrap {
+               HTMLparser = 1
+               HTMLparser {
+                       keepNonMatchedTags = 1
+                       htmlSpecialChars = 2
+               }
+       }
+}
+
+
+# Creates persistent ParseFunc setup for RTE content (which is mainly HTML) based on the "ts_css" transformation.
+lib.parseFunc_RTE < lib.parseFunc
+lib.parseFunc_RTE {
+       # Processing <table> and <blockquote> blocks separately
+       externalBlocks = article, aside, blockquote, div, dd, dl, footer, header, nav, ol, section, table, ul
+       externalBlocks {
+               # The blockquote content is passed into parseFunc again...
+               blockquote {
+                       stripNL = 1
+                       callRecursive = 1
+                       callRecursive {
+                               tagStdWrap {
+                                       HTMLparser = 1
+                                       HTMLparser.tags.blockquote.overrideAttribs = style="margin-bottom:0;margin-top:0;"
+                               }
+                       }
+               }
+
+               ol {
+                       stripNL = 1
+                       stdWrap.parseFunc = < lib.parseFunc
+               }
+
+               ul {
+                       stripNL = 1
+                       stdWrap.parseFunc = < lib.parseFunc
+               }
+
+               table {
+                       stripNL = 1
+                       stdWrap {
+                               HTMLparser = 1
+                               HTMLparser {
+                                       tags.table.fixAttrib.class {
+                                               default = contenttable
+                                               always = 1
+                                               list = contenttable
+                                       }
+                                       keepNonMatchedTags = 1
+                               }
+                       }
+                       HTMLtableCells = 1
+                       HTMLtableCells {
+                               # Recursive call to self but without wrapping non-wrapped cell content
+                               default.stdWrap {
+                                       parseFunc = < lib.parseFunc_RTE
+                                       parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag =
+                               }
+                               addChr10BetweenParagraphs = 1
+                       }
+               }
+
+               div {
+                       stripNL = 1
+                       callRecursive = 1
+               }
+
+               article < .div
+               aside < .div
+               footer < .div
+               header < .div
+               nav < .div
+               section < .div
+               dl < .div
+               dd < .div
+       }
+       nonTypoTagStdWrap {
+               encapsLines {
+                       encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr,dt
+                       remapTag.DIV = P
+                       nonWrappedTag = P
+                       innerStdWrap_all.ifBlank = &nbsp;
+               }
+       }
+       nonTypoTagStdWrap {
+               HTMLparser = 1
+               HTMLparser {
+                       keepNonMatchedTags = 1
+                       htmlSpecialChars = 2
+               }
+       }
+}
diff --git a/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.stdheader.ts b/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.stdheader.ts
new file mode 100644 (file)
index 0000000..80b81d0
--- /dev/null
@@ -0,0 +1,4 @@
+# Default configuration for content elements which still use a default header (e.g. all Extbase CTypes, or EXT:felogin)
+lib.stdheader >
+lib.stdheader =< lib.fluidContent
+lib.stdheader.templateName = HeaderOnly
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/styles.content.get.ts b/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/Setup/styles.content.get.ts
new file mode 100644 (file)
index 0000000..15ad4be
--- /dev/null
@@ -0,0 +1,6 @@
+styles.content.get = CONTENT
+styles.content.get {
+       table = tt_content
+       select.orderBy = sorting
+       select.where = colPos=0
+}
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/constants.txt b/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/constants.txt
new file mode 100644 (file)
index 0000000..89371a2
--- /dev/null
@@ -0,0 +1,54 @@
+styles.templates {
+       # cat=content/templates/b1; type=string; label= Default fallback path of Fluid Templates for all defined content elements
+       templateRootPath = EXT:fluid_styled_content/Resources/Private/Templates/Content/
+       # cat=content/templates/b2; type=string; label= Default fallback path of Fluid Partials for all defined content elements
+       partialRootPath = EXT:fluid_styled_content/Resources/Private/Partials/
+       # cat=content/templates/b3; type=string; label= Default fallback path of Fluid Layouts for all defined content elements
+       layoutRootPath = EXT:fluid_styled_content/Resources/Private/Layouts/
+}
+
+styles.content {
+       # cat=content/cHeader/h0; type=int[1-5]; label=Default Header type: Enter the number of the header layout to be used by default
+       defaultHeaderType = 2
+
+       # cat=content/cShortcut/t0; type=string; label=List of accepted tables
+       shortcut.tables = tt_content,tt_address,tt_news,tx_news_domain_model_news
+
+       # cat=content/parseFunc/a0; type=string; label=List of allowed HTML tags when rendering RTE content
+       allowTags = a, abbr, acronym, address, article, aside, b, bdo, big, blockquote, br, caption, center, cite, code, col, colgroup, dd, del, dfn, dl, div, dt, em, font, footer, header, h1, h2, h3, h4, h5, h6, hr, i, img, ins, kbd, label, li, link, meta, nav, ol, p, pre, q, samp, sdfield, section, small, span, strike, strong, style, sub, sup, table, thead, tbody, tfoot, td, th, tr, title, tt, u, ul, var
+
+       textmedia {
+               # cat=content/cTextmedia/b1; type=int+; label= Max Image/Media Width: This indicates that maximum number of pixels (width) a block of media elements inserted as content is allowed to consume
+               maxWidth = 600
+               # cat=content/cTextmedia/b2; type=int+; label= Max Image/Media Width (Text): Same as above, but this is the maximum width when text is wrapped around an block of media elements. Default is 50% of the normal Max Media Item Width
+               maxWidthInText = 300
+
+               # cat=content/cTextmedia/g1; type=int[0-100]; label= Advanced, Column space: Horizontal distance between media elements in a block in content elements of type "Media & Images". If you change this manually in your CSS, you need to adjust this setting accordingly
+               columnSpace = 10
+               # cat=content/cTextmedia/g2; type=int[0-100]; label= Advanced, Row space: Vertical distance after each media elements row in content elements of type ""Text & Media". If you change this manually in your CSS, you need to adjust this setting accordingly
+               rowSpace = 10
+               # cat=content/cTextmedia/g3; type=int[0-100]; label= Advanced, Margin to text: Horizontal distance between an imageblock and text in content elements of type "Text & Images"
+               textMargin = 10
+
+               # cat=content/cTextmedia/i1; type=color; label= Media element border, color: Bordercolor of media elements in content elements when "Border"-option for an element is set
+               borderColor = black
+               # cat=content/cTextmedia/i2; type=int[0-100]; label= Media element border, thickness: Thickness of border around media elements in content elements when "Border"-option for element is set
+               borderThick = 2
+               # cat=content/cTextmedia/i3; type=int+; label= Media element border, padding: Padding left and right to the media element, around the border
+               borderSpace = 0
+
+               # cat=content/cTextmedia/c1; type=int+; label= Click-enlarge Media Width: This specifies the width of the enlarged media element when click-enlarge is enabled
+               linkWrap.width = 800m
+               # cat=content/cTextmedia/c2; type=int+; label= Click-enlarge Media Height: This specifies the height of the enlarged media element when click-enlarge is enabled
+               linkWrap.height = 600m
+               linkWrap.effects =
+               # cat=content/cTextmedia/c3; type=boolean; label= Advanced, New window: If set, every click-enlarged media element will open in it's own popup window and not the current popup window (which may have a wrong size for the media element to fit in)
+               linkWrap.newWindow = 0
+               # cat=content/cTextmedia/c4; type=boolean; label= Lightbox click-enlarge rendering: Whether media elements with click-enlarge checked should be rendered lightbox-compliant
+               linkWrap.lightboxEnabled = 0
+               # cat=content/cTextmedia/c5; type=string; label= Lightbox CSS class: Which CSS class to use for lightbox links (only applicable if lightbox rendering is enabled)
+               linkWrap.lightboxCssClass = lightbox
+               # cat=content/cTextmedia/c6; type=string; label= Lightbox rel="" attribute: Which rel="" attribute to use for lightbox links (only applicable if lightbox rendering is enabled)
+               linkWrap.lightboxRelAttribute = lightbox[{field:uid}]
+       }
+}
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/setup.txt b/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/setup.txt
new file mode 100644 (file)
index 0000000..b1f2e0b
--- /dev/null
@@ -0,0 +1,224 @@
+<INCLUDE_TYPOSCRIPT: source="FILE: EXT:fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.parseFunc.ts">
+<INCLUDE_TYPOSCRIPT: source="FILE: EXT:fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.fluidContent.ts">
+<INCLUDE_TYPOSCRIPT: source="FILE: EXT:fluid_styled_content/Configuration/TypoScript/Static/Setup/lib.stdheader.ts">
+<INCLUDE_TYPOSCRIPT: source="FILE: EXT:fluid_styled_content/Configuration/TypoScript/Static/Setup/styles.content.get.ts">
+
+tt_content = CASE
+tt_content {
+       key {
+               field = CType
+       }
+       stdWrap {
+               # Setup the edit panel for all content elements
+               editPanel = 1
+               editPanel {
+                       allow = move, new, edit, hide, delete
+                       label = %s
+                       onlyCurrentPid = 1
+                       previewBorder = 1
+                       edit.displayRecord = 1
+               }
+       }
+       bullets =< lib.fluidContent
+       bullets {
+               templateName = Bullets
+               dataProcessing {
+                       10 = TYPO3\CMS\Frontend\DataProcessing\SplitProcessor
+                       10 {
+                               if {
+                                       value = 2
+                                       isLessThan.field = bullets_type
+                               }
+                               fieldName = bodytext
+                               removeEmptyEntries = 1
+                               as = bullets
+                       }
+                       20 = TYPO3\CMS\Frontend\DataProcessing\CommaSeparatedValueProcessor
+                       20 {
+                               fieldName = bodytext
+                               if {
+                                       value = 2
+                                       equals.field = bullets_type
+                               }
+                               fieldDelimiter = |
+                               as = bullets
+                       }
+               }
+               stdWrap {
+                       # Setup the edit icon for content element "bullets"
+                       editIcons = tt_content: header [header_layout], bodytext [bullets_type]
+                       editIcons {
+                               beforeLastTag = 1
+                               iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.bullets
+                       }
+               }
+       }
+       div =< lib.fluidContent
+       div {
+               templateName = Div
+       }
+       header =< lib.fluidContent
+       header {
+               templateName = Header
+               stdWrap {
+                       # Setup the edit icon for content element "header"
+                       editIcons = tt_content: header [header_layout|header_link], subheader, date
+                       editIcons {
+                               beforeLastTag = 1
+                               iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.header
+                       }
+               }
+       }
+       html =< lib.fluidContent
+       html {
+               templateName = Html
+               stdWrap {
+                       # Setup the edit icon for content element "html"
+                       editIcons = tt_content: bodytext
+                       editIcons {
+                               beforeLastTag = 1
+                               iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.html
+                       }
+               }
+       }
+       list =< lib.fluidContent
+       list {
+               templateName = List
+               stdWrap {
+                       # Setup the edit icon for content element "list"
+                       editIcons = tt_content: header [header_layout], list_type, layout, select_key, pages [recursive]
+                       editIcons {
+                               iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.list
+                       }
+               }
+       }
+       menu =< lib.fluidContent
+       menu {
+               templateName = Menu
+               dataProcessing {
+                       10 = TYPO3\CMS\Frontend\DataProcessing\SplitProcessor
+                       10 {
+                               if.isTrue.field = pages
+                               fieldName = pages
+                               delimiter = ,
+                               removeEmptyEntries = 1
+                               filterIntegers = 1
+                               filterUnique = 1
+                               as = pageUids
+                       }
+                       20 < .10
+                       20 {
+                               if.isTrue.field = selected_categories
+                               fieldName = selected_categories
+                               as = categoryUids
+                       }
+               }
+               stdWrap {
+                       # Setup the edit icon for content element "menu"
+                       editIcons = tt_content: header [header_layout], menu_type, pages
+                       editIcons {
+                               iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.menu
+                       }
+               }
+       }
+       shortcut =< lib.fluidContent
+       shortcut {
+               templateName = Shortcut
+
+               # Keep this, since the "conf" option can be used
+               variables.shortcuts = RECORDS
+               variables.shortcuts {
+                       source.field = records
+                       tables = {$styles.content.shortcut.tables}
+               }
+
+               stdWrap {
+                       # Setup the edit icon for content element "shortcut"
+                       editIcons = tt_content: header [header_layout], records
+                       editIcons {
+                               iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.shortcut
+                       }
+               }
+       }
+       table =< lib.fluidContent
+       table {
+               templateName = Table
+               dataProcessing {
+                       10 = TYPO3\CMS\Frontend\DataProcessing\CommaSeparatedValueProcessor
+                       10 {
+                               fieldName = bodytext
+                               fieldDelimiter.char.cObject = TEXT
+                               fieldDelimiter.char.cObject {
+                                       field = table_delimiter
+                               }
+                               fieldEnclosure.char.cObject = TEXT
+                               fieldEnclosure.char.cObject {
+                                       field = table_enclosure
+                               }
+                               maximumColumns.field = cols
+                               as = table
+                       }
+               }
+               stdWrap {
+                       # Setup the edit icon for content element "table"
+                       editIcons = tt_content: header [header_layout], bodytext, [table_caption|cols|table_header_position|table_tfoot]
+                       editIcons {
+                               beforeLastTag = 1
+                               iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.table
+                       }
+               }
+       }
+       textmedia =< lib.fluidContent
+       textmedia {
+               templateName = Textmedia
+               dataProcessing {
+                       10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
+                       10 {
+                               references.fieldName = media
+                       }
+                       20 = TYPO3\CMS\Frontend\DataProcessing\GalleryProcessor
+                       20 {
+                               maxGalleryWidth = {$styles.content.imgtext.maxW}
+                               maxGalleryWidth {
+                                       override.data = register:maxImageWidth
+                               }
+                               maxGalleryWidthInText = {$styles.content.imgtext.maxWInText}
+                               maxGalleryWidthInText {
+                                       override.data = register:maxImageWidthInText
+                               }
+                               columnSpacing = {$styles.content.imgtext.colSpace}
+                               borderWidth = {$styles.content.imgtext.borderThick}
+                               borderPadding = {$styles.content.imgtext.borderSpace}
+                       }
+               }
+               stdWrap {
+                       # Setup the edit icon for content element "textmedia"
+                       editIcons = tt_content: header [header_layout], bodytext, media [imageorient|imagewidth|imageheight], [imagecols|imageborder], image_zoom
+                       editIcons {
+                               iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.textmedia
+                       }
+               }
+       }
+       uploads =< lib.fluidContent
+       uploads {
+               templateName = Uploads
+               dataProcessing {
+                       10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
+                       10 {
+                               references.fieldName = media
+                               collections.field = file_collections
+                               sorting.field = filelink_sorting
+                       }
+               }
+               stdWrap {
+                       # Setup the edit icon for content element "uploads"
+                       editIcons = tt_content: header [header_layout], media, file_collections, filelink_sorting, [filelink_size|uploads_description|uploads_type]
+                       editIcons {
+                               iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.uploads
+                       }
+               }
+       }
+
+       # The "default" content element, which will be called when no rendering definition can be found
+       default =< lib.fluidContent
+}
diff --git a/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Styling/setup.txt b/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Styling/setup.txt
new file mode 100644 (file)
index 0000000..8ab26fc
--- /dev/null
@@ -0,0 +1,46 @@
+plugin.tx_frontend._CSS_DEFAULT_STYLE (
+       .ce-align-left { text-align: left; }
+       .ce-align-center { text-align: center; }
+       .ce-align-right { text-align: right; }
+
+       .ce-table td, .ce-table th { vertical-align: top; }
+
+       .ce-textpic, .ce-nowrap .ce-bodytext, .ce-gallery, .ce-row, .ce-uploads li, .ce-uploads div { overflow: hidden; }
+
+       .ce-left .ce-gallery, .ce-column { float: left; }
+       .ce-center .ce-outer { position: relative; float: right; right: 50%; }
+       .ce-center .ce-inner { position: relative; float: right; right: -50%; }
+       .ce-right .ce-gallery { float: right; }
+
+       .ce-gallery figure { display: table; margin: 0; }
+       .ce-gallery figcaption { display: table-caption; caption-side: bottom; }
+       .ce-gallery img { display: block; }
+       .ce-gallery iframe { border-width: 0; }
+       .ce-border img,
+       .ce-border iframe {
+               border: {$styles.content.textmedia.borderThick}px solid {$styles.content.textmedia.borderColor};
+               padding: {$styles.content.textmedia.borderSpace}px;
+       }
+
+       .ce-intext.ce-right .ce-gallery, .ce-intext.ce-left .ce-gallery, .ce-above .ce-gallery {
+               margin-bottom: {$styles.content.textmedia.textMargin}px;
+       }
+       .ce-intext.ce-right .ce-gallery { margin-left: {$styles.content.textmedia.textMargin}px; }
+       .ce-intext.ce-left .ce-gallery { margin-right: {$styles.content.textmedia.textMargin}px; }
+       .ce-below .ce-gallery { margin-top: {$styles.content.textmedia.textMargin}px; }
+
+       .ce-column { margin-right: {$styles.content.textmedia.colSpace}px; }
+       .ce-column:last-child { margin-right: 0; }
+
+       .ce-row { margin-bottom: {$styles.content.textmedia.rowSpace}px; }
+       .ce-row:last-child { margin-bottom: 0; }
+
+       .ce-above .ce-bodytext { clear: both; }
+
+       .ce-intext.ce-left ol, .ce-intext.ce-left ul { padding-left: 40px; overflow: auto; }
+
+       .ce-uploads { margin: 0; padding: 0; }
+       .ce-uploads li { list-style: none outside none; margin: 1em 0; }
+       .ce-uploads img { float: left; padding-right: 1em; vertical-align: top; }
+       .ce-uploads span { display: block; }
+)
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Language/Database.xlf b/typo3/sysext/fluid_styled_content/Resources/Private/Language/Database.xlf
new file mode 100644 (file)
index 0000000..1b3e6e8
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1427834041" source-language="en" datatype="plaintext" original="messages" date="2014-02-07T20:22:32Z" product-name="fluid_styled_content">
+               <header/>
+               <body>
+                       <trans-unit id="tt_content.CType.textmedia">
+                               <source>Text &amp; Media</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.bullets_type">
+                               <source>Type of bullets</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.bullets_type.0">
+                               <source>Unordered list (bullets)</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.bullets_type.1">
+                               <source>Ordered list (numbers)</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.bullets_type.2">
+                               <source>Definition list</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.uploads_description">
+                               <source>Display description</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.uploads_type">
+                               <source>Display file/icon/thumbnail</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.uploads_type.0">
+                               <source>Only file name</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.uploads_type.1">
+                               <source>File name and file extension icon</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.uploads_type.2">
+                               <source>File name and thumbnail (if possible)</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.palette.textmedia.imagewidth">
+                               <source>Width of each element (px)</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.palette.textmedia.imageheight">
+                               <source>Height of each element (px)</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.palette.textmedia.imageborder">
+                               <source>Border around each element</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.palette.gallerySettings">
+                               <source>Gallery Settings</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.palette.mediaAdjustments">
+                               <source>Media Adjustments</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.media_references">
+                               <source>Media elements</source>
+                       </trans-unit>
+                       <trans-unit id="tt_content.media_references.addFileReference">
+                               <source>Add media file</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf b/typo3/sysext/fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf
new file mode 100644 (file)
index 0000000..8a9cf18
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1428662501" source-language="en" datatype="plaintext" original="messages" date="2014-02-07T20:22:32Z" product-name="fluid_styled_content">
+               <header/>
+               <body>
+                       <trans-unit id="editIcon.bullets">
+                               <source>Edit bullet list</source>
+                       </trans-unit>
+                       <trans-unit id="editIcon.header">
+                               <source>Edit header</source>
+                       </trans-unit>
+                       <trans-unit id="editIcon.html">
+                               <source>Edit pure HTML content</source>
+                       </trans-unit>
+                       <trans-unit id="editIcon.list">
+                               <source>Change/configure plugin</source>
+                       </trans-unit>
+                       <trans-unit id="editIcon.menu">
+                               <source>Edit menu/sitemap</source>
+                       </trans-unit>
+                       <trans-unit id="editIcon.shortcut">
+                               <source>Edit record list</source>
+                       </trans-unit>
+                       <trans-unit id="editIcon.table">
+                               <source>Edit table</source>
+                       </trans-unit>
+                       <trans-unit id="editIcon.textmedia">
+                               <source>Edit text &amp; media</source>
+                       </trans-unit>
+                       <trans-unit id="editIcon.uploads">
+                               <source>Edit file list</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Language/locallang.xlf b/typo3/sysext/fluid_styled_content/Resources/Private/Language/locallang.xlf
new file mode 100644 (file)
index 0000000..661939f
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1427833048" source-language="en" datatype="plaintext" original="messages" date="2014-02-07T20:22:32Z" product-name="fluid_styled_content">
+               <header/>
+               <body>
+                       <trans-unit id="toTop">
+                               <source>To top</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Layouts/ContentFooter.html b/typo3/sysext/fluid_styled_content/Resources/Private/Layouts/ContentFooter.html
new file mode 100644 (file)
index 0000000..e11fcd3
--- /dev/null
@@ -0,0 +1,6 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<div id="c{data.uid}">
+       <f:render section="content" />
+       <f:render partial="Footer" arguments="{_all}" />
+</div>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Layouts/HeaderContentFooter.html b/typo3/sysext/fluid_styled_content/Resources/Private/Layouts/HeaderContentFooter.html
new file mode 100644 (file)
index 0000000..3d25eee
--- /dev/null
@@ -0,0 +1,7 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<div id="c{data.uid}">
+       <f:render partial="Header" arguments="{_all}" />
+       <f:render section="content" />
+       <f:render partial="Footer" arguments="{_all}" />
+</div>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Layouts/HeaderFooter.html b/typo3/sysext/fluid_styled_content/Resources/Private/Layouts/HeaderFooter.html
new file mode 100644 (file)
index 0000000..cb7d20e
--- /dev/null
@@ -0,0 +1,6 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<div id="c{data.uid}">
+       <f:render partial="Header" arguments="{_all}" />
+       <f:render partial="Footer" arguments="{_all}" />
+</div>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Footer.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Footer.html
new file mode 100644 (file)
index 0000000..68d55e1
--- /dev/null
@@ -0,0 +1,7 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:if condition="{data.linkToTop}">
+<p>
+       <a href="#"><f:translate key="toTop" extensionName="fluid_styled_content" /></a>
+</p>
+</f:if>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header.html
new file mode 100644 (file)
index 0000000..bb3c416
--- /dev/null
@@ -0,0 +1,42 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:if condition="{data.header_layout} != 100">
+       <f:if condition="{data.header}">
+               <f:if condition="{data.subheader}">
+                       <f:then>
+                               <header>
+                       </f:then>
+                       <f:else>
+                               <f:if condition="{data.date}">
+                                       <header>
+                               </f:if>
+                       </f:else>
+               </f:if>
+
+               <f:render partial="Header/Header" arguments="{
+                       header: data.header,
+                       layout: data.header_layout,
+                       link: data.header_link,
+                       default: settings.defaultHeaderType}" />
+
+               <f:if condition="{data.subheader}">
+                       <f:render partial="Header/SubHeader" arguments="{
+                               subheader: data.subheader,
+                               layout: data.header_layout,
+                               default: settings.defaultHeaderType}" />
+               </f:if>
+
+               <f:render partial="Header/Date" arguments="{_all}" />
+
+               <f:if condition="{data.subheader}">
+                       <f:then>
+                               </header>
+                       </f:then>
+                       <f:else>
+                               <f:if condition="{data.date}">
+                                       </header>
+                               </f:if>
+                       </f:else>
+               </f:if>
+       </f:if>
+</f:if>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Date.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Date.html
new file mode 100644 (file)
index 0000000..0e5081f
--- /dev/null
@@ -0,0 +1,9 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:if condition="{data.date}">
+       <p>
+               <time datetime="{data.date -> f:format.date(format: '%Y-%m-%d')}">
+                       <f:format.date format="%B %e, %Y">{data.date}</f:format.date>
+               </time>
+       </p>
+</f:if>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Header.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Header.html
new file mode 100644 (file)
index 0000000..d384cdc
--- /dev/null
@@ -0,0 +1,33 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:switch expression="{layout}">
+       <f:case value="1">
+               <h1><f:link.typolink parameter="{link}">{header}</f:link.typolink></h1>
+       </f:case>
+       <f:case value="2">
+               <h2><f:link.typolink parameter="{link}">{header}</f:link.typolink></h2>
+       </f:case>
+       <f:case value="3">
+               <h3><f:link.typolink parameter="{link}">{header}</f:link.typolink></h3>
+       </f:case>
+       <f:case value="4">
+               <h4><f:link.typolink parameter="{link}">{header}</f:link.typolink></h4>
+       </f:case>
+       <f:case value="5">
+               <h5><f:link.typolink parameter="{link}">{header}</f:link.typolink></h5>
+       </f:case>
+       <f:case value="6">
+               <h6><f:link.typolink parameter="{link}">{header}</f:link.typolink></h6>
+       </f:case>
+       <f:case value="100">
+               <f:comment> -- do not show header -- </f:comment>
+       </f:case>
+       <f:case default="true">
+               <f:if condition="{default}">
+                       <f:render partial="Header/Header" arguments="{
+                               header: header,
+                               layout: default,
+                               link: link}" />
+               </f:if>
+       </f:case>
+</f:switch>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/SubHeader.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/SubHeader.html
new file mode 100644 (file)
index 0000000..79495c7
--- /dev/null
@@ -0,0 +1,26 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:switch expression="{layout}">
+       <f:case value="1">
+               <h2>{subheader}</h2>
+       </f:case>
+       <f:case value="2">
+               <h3>{subheader}</h3>
+       </f:case>
+       <f:case value="3">
+               <h4>{subheader}</h4>
+       </f:case>
+       <f:case value="4">
+               <h5>{subheader}</h5>
+       </f:case>
+       <f:case value="5">
+               <h6>{subheader}</h6>
+       </f:case>
+       <f:case default="true">
+               <f:if condition="{default}">
+                       <f:render partial="Header/SubHeader" arguments="{
+                               subheader: subheader,
+                               layout: default}" />
+               </f:if>
+       </f:case>
+</f:switch>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/MediaGallery.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/MediaGallery.html
new file mode 100644 (file)
index 0000000..5900ab1
--- /dev/null
@@ -0,0 +1,86 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:if condition="{gallery.rows}">
+       <div class="ce-gallery{f:if(condition: data.imageborder, then: ' ce-border')}" data-ce-columns="{gallery.count.columns}" data-ce-images="{gallery.count.files}">
+               <f:if condition="{gallery.position.horizontal} == 'center'">
+                       <div class="ce-outer">
+                               <div class="ce-inner">
+               </f:if>
+               <f:for each="{gallery.rows}" as="row">
+                       <div class="ce-row">
+                               <f:for each="{row.columns}" as="column">
+                                       <f:if condition="{column.media}">
+                                               <div class="ce-column">
+                                                       <f:if condition="{column.media.description}">
+                                                               <f:then>
+                                                                       <figure>
+                                                               </f:then>
+                                                               <f:else>
+                                                                       <div class="ce-media">
+                                                               </f:else>
+                                                       </f:if>
+                                                       <f:if condition="{column.media.type} == 2">
+                                                               <f:render section="imageType" arguments="{_all}" />
+                                                       </f:if>
+                                                       <f:if condition="{column.media.type} == 4">
+                                                               <f:render section="videoType" arguments="{_all}" />
+                                                       </f:if>
+
+                                                       <f:if condition="{column.media.description}">
+                                                               <f:then>
+                                                                               <figcaption>
+                                                                                       {column.media.description}
+                                                                               </figcaption>
+                                                                       </figure>
+                                                               </f:then>
+                                                               <f:else>
+                                                                       </div>
+                                                               </f:else>
+                                                       </f:if>
+                                               </div>
+                                       </f:if>
+                               </f:for>
+                       </div>
+               </f:for>
+               <f:if condition="{gallery.position.horizontal} == 'center'">
+                               </div>
+                       </div>
+               </f:if>
+       </div>
+</f:if>
+
+<f:section name="imageType">
+       <f:if condition="{column.media.link}">
+               <f:then>
+                       <f:link.typolink parameter="{column.media.link}">
+                               <f:render section="media" arguments="{_all}" />
+                       </f:link.typolink>
+               </f:then>
+               <f:else>
+                       <f:if condition="{data.image_zoom}">
+                               <f:then>
+                                       <ce:link.clickEnlarge image="{column.media}" configuration="{settings.media.popup}">
+                                               <f:render section="media" arguments="{_all}" />
+                                       </ce:link.clickEnlarge>
+                               </f:then>
+                               <f:else>
+                                       <f:render section="media" arguments="{_all}" />
+                               </f:else>
+                       </f:if>
+               </f:else>
+       </f:if>
+</f:section>
+
+<f:section name="videoType">
+       <f:render section="media" arguments="{_all}" />
+</f:section>
+
+<f:section name="media">
+       <f:media
+               file="{column.media}"
+               width="{column.dimensions.width}"
+               height="{column.dimensions.height}"
+               alt="{column.media.alternative}"
+               title="{column.media.title}"
+       />
+</f:section>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Directory.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Directory.html
new file mode 100644 (file)
index 0000000..d90c459
--- /dev/null
@@ -0,0 +1,16 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.directory pageUids="{pageUids}" as="pages" levelAs="level">
+       <f:if condition="{pages}">
+               <ul>
+                       <f:for each="{pages}" as="page">
+                               <li>
+                                       <f:link.page pageUid="{page.uid}">
+                                               {page.title}
+                                       </f:link.page>
+                                       <f:render partial="Menu/Directory" arguments="{pageUids: {0: page.uid}}" />
+                               </li>
+                       </f:for>
+               </ul>
+       </f:if>
+</ce:menu.directory>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-0.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-0.html
new file mode 100644 (file)
index 0000000..a935299
--- /dev/null
@@ -0,0 +1,15 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.list pageUids="{pageUids}" as="pages">
+       <f:if condition="{pages}">
+               <ul class="ce-menu ce-menu-0">
+                       <f:for each="{pages}" as="page">
+                               <li>
+                                       <f:link.page pageUid="{page.uid}">
+                                               {page.title}
+                                       </f:link.page>
+                               </li>
+                       </f:for>
+               </ul>
+       </f:if>
+</ce:menu.list>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-1.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-1.html
new file mode 100644 (file)
index 0000000..51afc77
--- /dev/null
@@ -0,0 +1,15 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.directory pageUids="{pageUids}" as="pages">
+       <f:if condition="{pages}">
+               <ul class="ce-menu ce-menu-1">
+                       <f:for each="{pages}" as="page">
+                               <li>
+                                       <f:link.page pageUid="{page.uid}">
+                                               {page.title}
+                                       </f:link.page>
+                               </li>
+                       </f:for>
+               </ul>
+       </f:if>
+</ce:menu.directory>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-2.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-2.html
new file mode 100644 (file)
index 0000000..6013249
--- /dev/null
@@ -0,0 +1,16 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.list entryLevel="0" as="pages" levelAs="level">
+       <f:if condition="{pages}">
+               <ul class="ce-menu ce-menu-2">
+                       <f:for each="{pages}" as="page">
+                               <li>
+                                       <f:link.page pageUid="{page.uid}">
+                                               {page.title}
+                                       </f:link.page>
+                                       <f:render partial="Menu/Directory" arguments="{pageUids: {0: page.uid}}" />
+                               </li>
+                       </f:for>
+               </ul>
+       </f:if>
+</ce:menu.list>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-3.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-3.html
new file mode 100644 (file)
index 0000000..7381dac
--- /dev/null
@@ -0,0 +1,21 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.list pageUids="{pageUids}" as="pages">
+       <f:if condition="{pages}">
+               <ul class="ce-menu ce-menu-3">
+                       <f:for each="{pages}" as="page">
+                               <ce:menu.section pageUid="{page.uid}" as="contentElements" type="header">
+                                       <f:if condition="{contentElements}">
+                                               <f:for each="{contentElements}" as="contentElement">
+                                                       <li>
+                                                               <f:link.page pageUid="{page.uid}" section="c{contentElement.uid}">
+                                                                       {contentElement.header}
+                                                               </f:link.page>
+                                                       </li>
+                                               </f:for>
+                                       </f:if>
+                               </ce:menu.section>
+                       </f:for>
+               </ul>
+       </f:if>
+</ce:menu.list>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-4.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-4.html
new file mode 100644 (file)
index 0000000..c918202
--- /dev/null
@@ -0,0 +1,39 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.directory pageUids="{pageUids}" as="pages">
+       <f:if condition="{pages}">
+               <dl class="ce-menu ce-menu-4">
+                       <f:for each="{pages}" as="page">
+                               <dt>
+                                       <f:link.page pageUid="{page.uid}">
+                                               {page.title}
+                                       </f:link.page>
+                               </dt>
+                               <dd>
+                                       <f:if condition="{page.abstract}">
+                                               <f:then>
+                                                       {page.abstract}
+                                               </f:then>
+                                               <f:else>
+                                                       <f:if condition="{page.description}">
+                                                               <f:then>
+                                                                       {page.description}
+                                                               </f:then>
+                                                               <f:else>
+                                                                       <f:if condition="{page.subtitle}">
+                                                                               <f:then>
+                                                                                       {page.subtitle}
+                                                                               </f:then>
+                                                                               <f:else>
+                                                                                       &nbsp;
+                                                                               </f:else>
+                                                                       </f:if>
+                                                               </f:else>
+                                                       </f:if>
+                                               </f:else>
+                                       </f:if>
+                               </dd>
+                       </f:for>
+               </dl>
+       </f:if>
+</ce:menu.directory>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-5.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-5.html
new file mode 100644 (file)
index 0000000..94eec76
--- /dev/null
@@ -0,0 +1,15 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.updated pageUids="{pageUids}" as="pages" maximumAge="3600*24*7">
+       <f:if condition="{pages}">
+               <ul class="ce-menu ce-menu-5">
+                       <f:for each="{pages}" as="page">
+                               <li>
+                                       <f:link.page pageUid="{page.uid}">
+                                               {page.title}
+                                       </f:link.page>
+                               </li>
+                       </f:for>
+               </ul>
+       </f:if>
+</ce:menu.updated>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-6.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-6.html
new file mode 100644 (file)
index 0000000..52e5d8c
--- /dev/null
@@ -0,0 +1,15 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.keywords pageUids="{pageUids}" as="pages">
+       <f:if condition="{pages}">
+               <ul class="ce-menu ce-menu-6">
+                       <f:for each="{pages}" as="page">
+                               <li>
+                                       <f:link.page pageUid="{page.uid}">
+                                               {page.title}
+                                       </f:link.page>
+                               </li>
+                       </f:for>
+               </ul>
+       </f:if>
+</ce:menu.keywords>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-7.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-7.html
new file mode 100644 (file)
index 0000000..3d2bc8c
--- /dev/null
@@ -0,0 +1,28 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.directory pageUids="{pageUids}" as="pages">
+       <f:if condition="{pages}">
+               <ul class="ce-menu ce-menu-7">
+                       <f:for each="{pages}" as="page">
+                               <li>
+                                       <f:link.page pageUid="{page.uid}">
+                                               {page.title}
+                                       </f:link.page>
+                               </li>
+                               <ce:menu.section pageUid="{page.uid}" as="contentElements" type="header">
+                                       <f:if condition="{contentElements}">
+                                               <ul>
+                                                       <f:for each="{contentElements}" as="contentElement">
+                                                               <li>
+                                                                       <f:link.page pageUid="{page.uid}" section="c{contentElement.uid}">
+                                                                               {contentElement.header}
+                                                                       </f:link.page>
+                                                               </li>
+                                                       </f:for>
+                                               </ul>
+                                       </f:if>
+                               </ce:menu.section>
+                       </f:for>
+               </ul>
+       </f:if>
+</ce:menu.directory>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-8.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-8.html
new file mode 100644 (file)
index 0000000..12986f8
--- /dev/null
@@ -0,0 +1,16 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.directory pageUids="{pageUids}" as="pages" levelAs="level">
+       <f:if condition="{pages}">
+               <ul class="ce-menu ce-menu-8">
+                       <f:for each="{pages}" as="page">
+                               <li>
+                                       <f:link.page pageUid="{page.uid}">
+                                               {page.title}
+                                       </f:link.page>
+                                       <f:render partial="Menu/Directory" arguments="{pageUids: {0: page.uid}}" />
+                               </li>
+                       </f:for>
+               </ul>
+       </f:if>
+</ce:menu.directory>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-categorized_content.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-categorized_content.html
new file mode 100644 (file)
index 0000000..c047003
--- /dev/null
@@ -0,0 +1,17 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.categories categoryUids="{categoryUids}" as="contentElements" relationField="{data.category_field}" table="tt_content">
+       <f:if condition="{contentElements}">
+               <ul class="ce-menu ce-menu-categorized-content">
+                       <f:for each="{contentElements}" as="contentElement">
+                               <f:if condition="{contentElement.header}">
+                                       <li>
+                                               <f:link.page pageUid="{contentElement.pid}" section="c{contentElement.uid}">
+                                                       {contentElement.header}
+                                               </f:link.page>
+                                       </li>
+                               </f:if>
+                       </f:for>
+               </ul>
+       </f:if>
+</ce:menu.categories>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-categorized_pages.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu/Type-categorized_pages.html
new file mode 100644 (file)
index 0000000..8bdf843
--- /dev/null
@@ -0,0 +1,15 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
+<ce:menu.categories categoryUids="{categoryUids}" as="pages" relationField="{data.category_field}" table="pages">
+       <f:if condition="{pages}">
+               <ul class="ce-menu ce-menu-9">
+                       <f:for each="{pages}" as="page">
+                               <li>
+                                       <f:link.page pageUid="{page.uid}">
+                                               {page.title}
+                                       </f:link.page>
+                               </li>
+                       </f:for>
+               </ul>
+       </f:if>
+</ce:menu.categories>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Table/Columns.html b/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Table/Columns.html
new file mode 100644 (file)
index 0000000..a3d55db
--- /dev/null
@@ -0,0 +1,98 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:if condition="{rowIterator.isFirst}">
+       <f:then>
+               <f:if condition="{data.table_header_position} == 1">
+                       <f:then>
+                               <th>
+                       </f:then>
+                       <f:else>
+                               <f:if condition="{columnIterator.isFirst}">
+                                       <f:then>
+                                               <f:if condition="{data.table_header_position} == 2">
+                                                       <f:then>
+                                                               <th>
+                                                       </f:then>
+                                                       <f:else>
+                                                               <td>
+                                                       </f:else>
+                                               </f:if>
+                                       </f:then>
+                                       <f:else>
+                                               <td>
+                                       </f:else>
+                               </f:if>
+                       </f:else>
+               </f:if>
+       </f:then>
+       <f:else>
+               <f:if condition="{columnIterator.isFirst}">
+                       <f:then>
+                               <f:if condition="{data.table_header_position} == 2">
+                                       <f:then>
+                                               <th>
+                                       </f:then>
+                                       <f:else>
+                                               <td>
+                                       </f:else>
+                               </f:if>
+                       </f:then>
+                       <f:else>
+                               <td>
+                       </f:else>
+               </f:if>
+       </f:else>
+</f:if>
+
+<f:if condition="{cell}">
+       <f:then>
+               <f:format.nl2br>{cell}</f:format.nl2br>
+       </f:then>
+       <f:else>
+               &nbsp;
+       </f:else>
+</f:if>
+
+<f:if condition="{rowIterator.isFirst}">
+       <f:then>
+               <f:if condition="{data.table_header_position} == 1">
+                       <f:then>
+                               </th>
+                       </f:then>
+                       <f:else>
+                               <f:if condition="{columnIterator.isFirst}">
+                                       <f:then>
+                                               <f:if condition="{data.table_header_position} == 2">
+                                                       <f:then>
+                                                               </th>
+                                                       </f:then>
+                                                       <f:else>
+                                                               </td>
+                                                       </f:else>
+                                               </f:if>
+                                       </f:then>
+                                       <f:else>
+                                               </td>
+                                       </f:else>
+                               </f:if>
+                       </f:else>
+               </f:if>
+       </f:then>
+       <f:else>
+               <f:if condition="{columnIterator.isFirst}">
+                       <f:then>
+                               <f:if condition="{data.table_header_position} == 2">
+                                       <f:then>
+                                               </th>
+                                       </f:then>
+                                       <f:else>
+                                               </td>
+                                       </f:else>
+                               </f:if>
+                       </f:then>
+                       <f:else>
+                               </td>
+                       </f:else>
+               </f:if>
+       </f:else>
+</f:if>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Bullets.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Bullets.html
new file mode 100644 (file)
index 0000000..1d08262
--- /dev/null
@@ -0,0 +1,40 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:layout name="HeaderContentFooter" />
+
+<f:section name="content">
+       <f:if condition="{bullets}">
+               <f:switch expression="{data.bullets_type}">
+                       <f:case value="0">
+                               <ul class="ce-bullets">
+                                       <f:for each="{bullets}" as="bullet">
+                                               <li>{bullet}</li>
+                                       </f:for>
+                               </ul>
+                       </f:case>
+                       <f:case value="1">
+                               <ol class="ce-bullets">
+                                       <f:for each="{bullets}" as="bullet">
+                                               <li>{bullet}</li>
+                                       </f:for>
+                               </ol>
+                       </f:case>
+                       <f:case value="2">
+                               <dl class="ce-bullets">
+                                       <f:for each="{bullets}" as="definitionListItem">
+                                               <f:for each="{definitionListItem}" as="termDescription" iteration="termDescriptionIterator">
+                                                       <f:if condition="{termDescriptionIterator.isFirst}">
+                                                               <f:then>
+                                                                       <dt>{termDescription}</dt>
+                                                               </f:then>
+                                                               <f:else>
+                                                                       <dd>{termDescription}</dd>
+                                                               </f:else>
+                                                       </f:if>
+                                               </f:for>
+                                       </f:for>
+                               </dl>
+                       </f:case>
+               </f:switch>
+       </f:if>
+</f:section>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Default.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Default.html
new file mode 100644 (file)
index 0000000..4657268
--- /dev/null
@@ -0,0 +1,3 @@
+<p style="background-color: yellow;">
+       <strong>ERROR:</strong> Content Element type "{data.CType}" has no rendering definition!
+</p>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Div.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Div.html
new file mode 100644 (file)
index 0000000..043344d
--- /dev/null
@@ -0,0 +1,7 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:layout name="ContentFooter" />
+
+<f:section name="content">
+       <hr class="ce-div" />
+</f:section>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Header.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Header.html
new file mode 100644 (file)
index 0000000..1820167
--- /dev/null
@@ -0,0 +1,3 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:layout name="HeaderFooter" />
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/HeaderOnly.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/HeaderOnly.html
new file mode 100644 (file)
index 0000000..b62666b
--- /dev/null
@@ -0,0 +1,4 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:comment> Only used for lib.stdheader purposes. </f:comment>
+<f:render partial="Header" arguments="{_all}" />
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Html.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Html.html
new file mode 100644 (file)
index 0000000..33c7dbd
--- /dev/null
@@ -0,0 +1,7 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:layout name="ContentFooter" />
+
+<f:section name="content">
+       <f:format.raw>{data.bodytext}</f:format.raw>
+</f:section>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/List.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/List.html
new file mode 100644 (file)
index 0000000..6cd878f
--- /dev/null
@@ -0,0 +1,7 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:layout name="HeaderContentFooter" />
+
+<f:section name="content">
+       <f:cObject typoscriptObjectPath="tt_content.list.20.{data.list_type}" data="{data}" />
+</f:section>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Menu.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Menu.html
new file mode 100644 (file)
index 0000000..02cb426
--- /dev/null
@@ -0,0 +1,7 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:layout name="HeaderContentFooter" />
+
+<f:section name="content">
+       <f:render partial="Menu/Type-{data.menu_type}" arguments="{_all}" />
+</f:section>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Shortcut.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Shortcut.html
new file mode 100644 (file)
index 0000000..51670ba
--- /dev/null
@@ -0,0 +1,7 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:layout name="ContentFooter" />
+
+<f:section name="content">
+       <f:format.raw>{shortcuts}</f:format.raw>
+</f:section>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Table.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Table.html
new file mode 100644 (file)
index 0000000..e72892e
--- /dev/null
@@ -0,0 +1,64 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:layout name="HeaderContentFooter" />
+
+<f:section name="content">
+       <f:if condition="{table}">
+               <table class="ce-table">
+                       <f:if condition="{data.table_caption}">
+                               <caption>{data.table_caption}</caption>
+                       </f:if>
+                       <f:for each="{table}" as="row" iteration="rowIterator">
+
+                               <f:if condition="{rowIterator.isFirst}">
+                                       <f:then>
+                                               <f:if condition="{data.table_header_position} == 1">
+                                                       <f:then>
+                                                               <thead>
+                                                       </f:then>
+                                                       <f:else>
+                                                               <tbody>
+                                                       </f:else>
+                                               </f:if>
+                                       </f:then>
+                                       <f:else>
+                                               <f:if condition="{rowIterator.isLast}">
+                                                       <f:if condition="{data.table_tfoot}">
+                                                               </tbody>
+                                                               <tfoot>
+                                                       </f:if>
+                                               </f:if>
+                                       </f:else>
+                               </f:if>
+
+                               <tr>
+                                       <f:for each="{row}" as="cell" iteration="columnIterator">
+                                               <f:render partial="Table/Columns" arguments="{_all}" />
+                                       </f:for>
+                               </tr>
+
+                               <f:if condition="{rowIterator.isFirst}">
+                                       <f:then>
+                                               <f:if condition="{data.table_header_position} == 1">
+                                                       </thead>
+                                                       <tbody>
+                                               </f:if>
+                                       </f:then>
+                                       <f:else>
+                                               <f:if condition="{rowIterator.isLast}">
+                                                       <f:if condition="{data.table_tfoot}">
+                                                               <f:then>
+                                                                       </tfoot>
+                                                               </f:then>
+                                                               <f:else>
+                                                                       </tbody>
+                                                               </f:else>
+                                                       </f:if>
+                                               </f:if>
+                                       </f:else>
+                               </f:if>
+
+                       </f:for>
+               </table>
+       </f:if>
+</f:section>
+</html>
\ No newline at end of file
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Textmedia.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Textmedia.html
new file mode 100644 (file)
index 0000000..e84930b
--- /dev/null
@@ -0,0 +1,26 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<div id="c{data.uid}">
+       <f:if condition="{gallery.position.noWrap} != 1">
+               <f:render partial="Header" arguments="{_all}" />
+       </f:if>
+
+       <div class="ce-textpic ce-{gallery.position.horizontal} ce-{gallery.position.vertical}{f:if(condition: gallery.position.noWrap, then: ' ce-nowrap')}">
+               <f:if condition="{gallery.position.vertical} != 'below'">
+                       <f:render partial="MediaGallery" arguments="{_all}" />
+               </f:if>
+
+               <div class="ce-bodytext">
+                       <f:if condition="{gallery.position.noWrap}">
+                               <f:render partial="Header" arguments="{_all}" />
+                       </f:if>
+                       <f:format.html>{data.bodytext}</f:format.html>
+               </div>
+
+               <f:if condition="{gallery.position.vertical} == 'below'">
+                       <f:render partial="MediaGallery" arguments="{_all}" />
+               </f:if>
+       </div>
+
+       <f:render partial="Footer" arguments="{_all}" />
+</div>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Uploads.html b/typo3/sysext/fluid_styled_content/Resources/Private/Templates/Content/Uploads.html
new file mode 100644 (file)
index 0000000..d50ff35
--- /dev/null
@@ -0,0 +1,53 @@
+<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
+<f:layout name="HeaderContentFooter" />
+<f:section name="content">
+       <f:if condition="{files}">
+               <ul class="ce-uploads">
+                       <f:for each="{files}" as="file" iteration="fileIterator">
+                               <li>
+                                       <f:if condition="{data.uploads_type} == 1">
+                                               <img src="{f:uri.resource(path: 'Icons/FileIcons/{file.extension}.gif', extensionName: 'frontend')}" alt="">
+                                       </f:if>
+
+                                       <f:if condition="{data.uploads_type} == 2">
+                                               <f:if condition="{f:uri.image(src: 'file:{f:if(condition: file.originalFile, then: \'file:{file.originalFile.uid}\', else: \'file:{file.uid}\')}')} != '/'">
+                                                       <f:then>
+                                                               <a href="{file.publicUrl}">
+                                                                       <f:image src="{file.uid}" treatIdAsReference="{f:if(condition: file.originalFile, then: '1', else: '0')}" width="150" alt="{file.properties.alternative}" />
+                                                               </a>
+                                                       </f:then>
+                                                       <f:else>
+                                                               <img src="{f:uri.resource(path: 'Icons/FileIcons/{file.extension}.gif', extensionName: 'frontend')}" alt="">
+                                                       </f:else>
+                                               </f:if>
+                                       </f:if>
+
+                                       <div>
+                                               <f:if condition="{file.name}">
+                                                       <a href="{file.publicUrl}">
+                                                               <span class="ce-uploads-fileName">
+                                                                       {file.name}
+                                                               </span>
+                                                       </a>
+                                               </f:if>
+
+                                               <f:if condition="{file.properties.description}">
+                                                       <f:if condition="{data.uploads_description}">
+                                                               <span class="ce-uploads-description">
+                                                                       {file.properties.description}
+                                                               </span>
+                                                       </f:if>
+                                               </f:if>
+
+                                               <f:if condition="{data.filelink_size}">
+                                                       <span class="ce-uploads-filesize">
+                                                               <f:format.bytes value="{file.properties.size}" />
+                                                       </span>
+                                               </f:if>
+                                       </div>
+                               </li>
+                       </f:for>
+               </ul>
+       </f:if>
+</f:section>
+</html>
diff --git a/typo3/sysext/fluid_styled_content/composer.json b/typo3/sysext/fluid_styled_content/composer.json
new file mode 100644 (file)
index 0000000..19e9863
--- /dev/null
@@ -0,0 +1,27 @@
+{
+       "name": "typo3/cms-fluid-styled-content",
+       "type": "typo3-cms-extension",
+       "description": "TYPO3 Core",
+       "homepage": "http://typo3.org",
+       "license": ["GPL-2.0+"],
+
+       "require": {
+               "typo3/cms-core": "*",
+               "typo3/cms-frontend": "*"
+       },
+       "replace": {
+               "fluid_styled_content": "*"
+       },
+       "extra": {
+               "typo3/cms": {
+                       "Package": {
+                               "partOfFactoryDefault": true
+                       }
+               }
+       },
+       "autoload": {
+               "psr-4": {
+                       "TYPO3\\CMS\\FluidStyledContent\\": "Classes/"
+               }
+       }
+}
diff --git a/typo3/sysext/fluid_styled_content/ext_emconf.php b/typo3/sysext/fluid_styled_content/ext_emconf.php
new file mode 100644 (file)
index 0000000..0d26c43
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+$EM_CONF[$_EXTKEY] = array(
+       'title' => 'Fluid Styled Content',
+       'description' => 'A set of common content elements based on Fluid for Frontend output.',
+       'category' => 'fe',
+       'state' => 'experimental',
+       'author' => 'TYPO3 Core Team',
+       'author_email' => 'info@typo3.org',
+       'version' => '7.5.0',
+       'constraints' => array(
+               'depends' => array(
+                       'typo3' => '7.5.0-7.5.99'
+               ),
+               'conflicts' => array(
+                       'css_styled_content' => ''
+               ),
+               'suggests' => array(),
+       ),
+);
diff --git a/typo3/sysext/fluid_styled_content/ext_icon.png b/typo3/sysext/fluid_styled_content/ext_icon.png
new file mode 100644 (file)
index 0000000..ef81ce2
Binary files /dev/null and b/typo3/sysext/fluid_styled_content/ext_icon.png differ
diff --git a/typo3/sysext/fluid_styled_content/ext_localconf.php b/typo3/sysext/fluid_styled_content/ext_localconf.php
new file mode 100644 (file)
index 0000000..2b66ba2
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+defined('TYPO3_MODE') or die();
+
+// Define TypoScript as content rendering template
+$GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'][] = 'fluidstyledcontent/Configuration/TypoScript/Static/';
+
+// Register for hook to show preview of tt_content element of CType="textmedia" in page module
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['textmedia'] = \TYPO3\CMS\FluidStyledContent\Hooks\TextmediaPreviewRenderer::class;
diff --git a/typo3/sysext/fluid_styled_content/ext_tables.sql b/typo3/sysext/fluid_styled_content/ext_tables.sql
new file mode 100644 (file)
index 0000000..163cc3f
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# Table structure for table 'tt_content'
+#
+CREATE TABLE tt_content (
+       bullets_type tinyint(3) unsigned DEFAULT '0' NOT NULL,
+       uploads_description tinyint(1) unsigned DEFAULT '0' NOT NULL,
+       uploads_type tinyint(3) unsigned DEFAULT '0' NOT NULL
+);
index 81a342e..073be89 100644 (file)
@@ -1093,19 +1093,77 @@ return array(
                '1' => array(
                        'showitem' => 'CType'
                ),
-               'menu' => array(
-                       'subtype_value_field' => 'menu_type',
-                       'subtypes_excludelist' => array(
-                               '2' => 'pages',
-                               'categorized_pages' => 'pages',
-                               'categorized_content' => 'pages',
-                       ),
-                       'subtypes_addlist' => array(
-                               'categorized_pages' => 'selected_categories;;menu, category_field;;menu',
-                               'categorized_content' => 'selected_categories;;menu, category_field;;menu',
-                       )
+               'bullets' => array(
+                       'showitem' => '
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,
+                                       bodytext;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext.ALT.bulletlist_formlabel;;nowrap,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
+                                       layout;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:layout_formlabel,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
+                                       hidden;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:field.default.hidden,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended
+                       '
+               ),
+               'div' => array(
+                       'showitem' => '
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
+                                       header;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header.ALT.div_formlabel,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
+                                       layout;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:layout_formlabel,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
+                                       hidden;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:field.default.hidden,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended
+                       '
+               ),
+               'header' => array(
+                       'showitem' => '
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.headers;headers,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
+                                       layout;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:layout_formlabel,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
+                                       hidden;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:field.default.hidden,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended
+                       '
+               ),
+               'html' => array(
+                       'showitem' => '
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
+                                       header;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header.ALT.html_formlabel,
+                                       bodytext;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext.ALT.html_formlabel;;nowrap:wizards[t3editor],
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
+                                       layout;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:layout_formlabel,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
+                                       hidden;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:field.default.hidden,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended
+                       '
                ),
                'list' => array(
+                       'showitem' => '
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.plugin,
+                                       list_type;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:list_type_formlabel,
+                                       select_key;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:select_key_formlabel,
+                                       pages;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:pages.ALT.list_formlabel,
+                                       recursive,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
+                                       layout;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:layout_formlabel,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
+                                       hidden;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:field.default.hidden,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended
+                       ',
                        'subtype_value_field' => 'list_type',
                        'subtypes_excludelist' => array(
                                '3' => 'layout',
@@ -1122,23 +1180,78 @@ return array(
                                '21' => 'layout'
                        )
                ),
+               'menu' => array(
+                       'showitem' => '
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.menu;menu,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
+                                       layout;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:layout_formlabel,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
+                                       hidden;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:field.default.hidden,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.accessibility,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.menu_accessibility;menu_accessibility,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended
+                       ',
+                       'subtype_value_field' => 'menu_type',
+                       'subtypes_excludelist' => array(
+                               '2' => 'pages',
+                               'categorized_pages' => 'pages',
+                               'categorized_content' => 'pages',
+                       ),
+                       'subtypes_addlist' => array(
+                               'categorized_pages' => 'selected_categories;;menu, category_field;;menu',
+                               'categorized_content' => 'selected_categories;;menu, category_field;;menu',
+                       )
+               ),
+               'shortcut' => array(
+                       'showitem' => '
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
+                                       header;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header.ALT.shortcut_formlabel,
+                                       records;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:records_formlabel,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
+                                       layout;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:layout_formlabel,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
+                                       hidden;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:field.default.hidden,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended
+                       '
+               ),
                'table' => array(
                        'showitem' => '
                                        --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
                                        --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,
-                                       bodytext;LLL:EXT:frontend/Resources/Private/Language/TCA.xlf:field.table.bodytext,
+                                       bodytext;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:field.table.bodytext,
                                        --palette--;;tableconfiguration,
                                        table_caption,
                                --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
                                        layout;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:layout_formlabel,
                                        --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.table_layout;tablelayout,
-                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/TCA.xlf:palette.appearanceLinks;appearanceLinks,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
                                --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
-                                       hidden;LLL:EXT:frontend/Resources/Private/Language/TCA.xlf:field.default.hidden,
+                                       hidden;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:field.default.hidden,
                                        --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
                                --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended
                        '
                ),
+               'uploads' => array(
+                       'showitem' => '
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:media;uploads,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
+                                       layout;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:layout_formlabel,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.uploads_layout;uploadslayout,
+                                        --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
+                                       hidden;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:field.default.hidden,
+                                       --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
+                               --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended
+                       '
+               )
        ),
        'palettes' => array(
                'general' => array(
@@ -1216,6 +1329,12 @@ return array(
                                filelink_size;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:filelink_size_formlabel
                        ',
                ),
+               'appearanceLinks' => array(
+                       'showitem' => '
+                               sectionIndex;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:sectionIndex_formlabel,
+                               linkToTop;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:linkToTop_formlabel
+                       '
+               ),
                'tableconfiguration' => array(
                        'showitem' => '
                                table_delimiter,
index 6c8a3a7..ec2e5d5 100644 (file)
                        <trans-unit id="imagecaption.ALT.script_formlabel">
                                <source>Comments</source>
                        </trans-unit>
+                       <trans-unit id="field.default.hidden">
+                               <source>Visibility of content element</source>
+                       </trans-unit>
+                       <trans-unit id="field.table.bodytext">
+                               <source>Table content</source>
+                       </trans-unit>
                        <trans-unit id="palette.general">
                                <source>Content Element</source>
                        </trans-unit>
                        <trans-unit id="palette.table_layout">
                                <source>Table Layout</source>
                        </trans-unit>
+                       <trans-unit id="palette.appearanceLinks">
+                               <source>Links</source>
+                       </trans-unit>
                        <trans-unit id="tabs.access">
                                <source>Access</source>
                        </trans-unit>
                        <trans-unit id="tabs.extended">
                                <source>Extended</source>
                        </trans-unit>
+                       <trans-unit id="tabs.accessibility">
+                               <source>Accessibility</source>
+                       </trans-unit>
                </body>
        </file>
 </xliff>
index a855ddc..2bec5df 100644 (file)
        background-position: -306px -198px !important;
 
 }
+.t3-icon-x-content-text-media {
+       background-position: -306px -198px !important;
+
+}
 .t3-icon-x-content-text {
        background-position: -288px -198px !important;