Initial commit - Typo3 11.5.41
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 48 KiB |
474
typo3conf/ext/pw_teaser/Documentation/Configuration/Index.rst
Normal file
@@ -0,0 +1,474 @@
|
||||
.. include:: ../Includes.txt
|
||||
|
||||
.. _configuration:
|
||||
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
pw_teaser provides plugin settings, which can get preset by TypoScript. Settings set in plugin directly (FlexForm) will
|
||||
overwrite the TypoScript defaults.
|
||||
|
||||
.. _configuration_reference:
|
||||
|
||||
Reference
|
||||
---------
|
||||
|
||||
- :ref:`configuration-general`
|
||||
- :ref:`configuration-visibility`
|
||||
- :ref:`configuration-template`
|
||||
|
||||
|
||||
.. _configuration-general:
|
||||
|
||||
General preferences
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. image:: Images/settings-general.png
|
||||
:alt: General settings in pw_teaser plugin
|
||||
:width: 50%
|
||||
|
||||
===================================== ============
|
||||
Property Type
|
||||
===================================== ============
|
||||
source_ ``string``
|
||||
customPages_ ``string``
|
||||
recursionDepthFrom_ ``integer``
|
||||
recursionDepth_ ``integer``
|
||||
orderByPlugin_ ``bool``
|
||||
loadContents_ ``bool``
|
||||
pageMode_ ``string``
|
||||
===================================== ============
|
||||
|
||||
|
||||
.. _source:
|
||||
|
||||
source
|
||||
""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
source
|
||||
Data type
|
||||
string
|
||||
Description
|
||||
Defines which pages should be listed. Allowed values: ``thisChildren``, ``thisChildrenRecursively``, ``custom``,
|
||||
``customChildren`` or ``customChildrenRecursively``.
|
||||
|
||||
|
||||
.. _customPages:
|
||||
|
||||
customPages
|
||||
"""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
customPages
|
||||
Data type
|
||||
string
|
||||
Description
|
||||
Comma separated list of page uids, which should get listed. In plugin this field is just visible if source got
|
||||
one of the values ``custom``, ``customChildren`` or ``customChildrenRecursively``.
|
||||
|
||||
|
||||
.. _recursionDepthFrom:
|
||||
|
||||
recursionDepthFrom
|
||||
""""""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
recursionDepthFrom
|
||||
Data type
|
||||
integer
|
||||
Default
|
||||
0
|
||||
Description
|
||||
Start of recursion depth. Default is zero (0).
|
||||
Just takes effect if source is ``thisChildrenRecursively`` or ``customChildrenRecursively``.
|
||||
|
||||
|
||||
.. _recursionDepth:
|
||||
|
||||
recursionDepth
|
||||
""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
recursionDepth
|
||||
Data type
|
||||
integer
|
||||
Default
|
||||
0
|
||||
Description
|
||||
Depth of recursion. Just takes effect if source is ``thisChildrenRecursively`` or ``customChildrenRecursively``.
|
||||
|
||||
|
||||
.. _orderByPlugin:
|
||||
|
||||
orderByPlugin
|
||||
""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
orderByPlugin
|
||||
Data type
|
||||
boolean
|
||||
Default
|
||||
0
|
||||
Description
|
||||
Just visible if source got the value ``custom``.
|
||||
If enabled the pages will be ordered like defined in field customPages.
|
||||
|
||||
|
||||
.. _loadContents:
|
||||
|
||||
loadContents
|
||||
""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
loadContents
|
||||
Data type
|
||||
boolean
|
||||
Default
|
||||
0
|
||||
Description
|
||||
If checked the contents (tt_content) of current page will be loaded too.
|
||||
This may need more performance, and should only be enabled if used.
|
||||
|
||||
|
||||
.. _pageMode:
|
||||
|
||||
pageMode
|
||||
""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
pageMode
|
||||
Data type
|
||||
string
|
||||
Default
|
||||
flat
|
||||
Description
|
||||
Defines how found pages should be passed to fluid template. Possible values are: ``flat`` and ``nested``.
|
||||
Default is ``flat``. If ``nested`` is chosen, subpages get filled in the attribute "childPages" recursively
|
||||
instead of passing a flat array.
|
||||
|
||||
In this case the options ``recursionDepthFrom``, ``orderBy`` and ``limit`` will be ignored.
|
||||
The option ``nested`` is not available for source custom.
|
||||
|
||||
|
||||
.. _configuration-visibility:
|
||||
|
||||
Visibility options
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. image:: Images/settings-visibility.png
|
||||
:alt: Visibility settings in pw_teaser plugin
|
||||
:width: 50%
|
||||
|
||||
===================================== ============
|
||||
Property Type
|
||||
===================================== ============
|
||||
orderBy_ ``string``
|
||||
orderByCustomField_ ``string``
|
||||
orderDirection_ ``string``
|
||||
limit_ ``integer``
|
||||
showNavHiddenItems_ ``bool``
|
||||
hideCurrentPage_ ``bool``
|
||||
showDoktypes_ ``string``
|
||||
ignoreUids_ ``string``
|
||||
categoriesList_ ``string``
|
||||
categoryMode_ ``integer``
|
||||
===================================== ============
|
||||
|
||||
|
||||
.. _orderBy:
|
||||
|
||||
orderBy
|
||||
"""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
orderBy
|
||||
Data type
|
||||
string
|
||||
Description
|
||||
Results may get ordered by: ``title``, ``sorting``, ``crdate``, ``tstamp``, ``starttime``, ``endtime``,
|
||||
``newUntil``, ``random`` or ``customField``.
|
||||
|
||||
|
||||
.. _orderByCustomField:
|
||||
|
||||
orderByCustomField
|
||||
""""""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
orderByCustomField
|
||||
Data type
|
||||
string
|
||||
Description
|
||||
If orderBy got value ``customField``, this field defines the name of the custom field to order by.
|
||||
This is useful if you have extended the ``pages`` table with new columns.
|
||||
|
||||
.. _orderDirection:
|
||||
|
||||
orderDirection
|
||||
""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
orderDirection
|
||||
Data type
|
||||
string
|
||||
Default
|
||||
asc
|
||||
Description
|
||||
Controls the direction of ordering. May be: ``asc`` or ``desc``. Has no effect when orderBy is ``random``.
|
||||
|
||||
|
||||
.. _limit:
|
||||
|
||||
limit
|
||||
"""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
limit
|
||||
Data type
|
||||
integer
|
||||
Default
|
||||
0
|
||||
Description
|
||||
Amount of pages which should be displayed. First the ordering takes effect, then it will be limited.
|
||||
When zero (0), limitation is disabled.
|
||||
|
||||
|
||||
.. _showNavHiddenItems:
|
||||
|
||||
showNavHiddenItems
|
||||
""""""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
showNavHiddenItems
|
||||
Data type
|
||||
boolean
|
||||
Default
|
||||
0
|
||||
Description
|
||||
If enabled pages which are hidden for navigation (``nav_hide``), will be displayed anyway.
|
||||
|
||||
|
||||
|
||||
.. _hideCurrentPage:
|
||||
|
||||
hideCurrentPage
|
||||
"""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
hideCurrentPage
|
||||
Data type
|
||||
boolean
|
||||
Default
|
||||
1
|
||||
Description
|
||||
If enabled the current page will be removed from result.
|
||||
This has no effect, if the current page is no part of results anyway.
|
||||
|
||||
|
||||
|
||||
.. _showDoktypes:
|
||||
|
||||
showDoktypes
|
||||
""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
showDoktypes
|
||||
Data type
|
||||
string
|
||||
Default
|
||||
1,2
|
||||
Description
|
||||
Comma separated list of ``doktype`` to display.
|
||||
|
||||
|
||||
|
||||
.. _ignoreUids:
|
||||
|
||||
ignoreUids
|
||||
""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
ignoreUids
|
||||
Data type
|
||||
string
|
||||
Description
|
||||
Comma separated list of page uids which should be ignored, always.
|
||||
|
||||
|
||||
.. _categoriesList:
|
||||
|
||||
categoriesList
|
||||
""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
categoriesList
|
||||
Data type
|
||||
string
|
||||
Description
|
||||
Comma separated list of ``sys_category`` uids, which are selected.
|
||||
|
||||
|
||||
.. _categoryMode:
|
||||
|
||||
categoryMode
|
||||
""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
categoryMode
|
||||
Data type
|
||||
integer
|
||||
Description
|
||||
Mode to influence showed pages by selected categories (categoriesList). Available modes are:
|
||||
|
||||
* ``1`` - Show pages with selected categories (OR)
|
||||
* ``2`` - Show pages with selected categories (AND)
|
||||
* ``3`` - Do NOT show pages witch selected categories (OR)
|
||||
* ``4`` - Do NOT show pages witch selected categories (AND)
|
||||
|
||||
.. _configuration-template:
|
||||
|
||||
Template view
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
See :ref:`templates` for further details.
|
||||
|
||||
.. image:: Images/settings-template.png
|
||||
:alt: Template settings in pw_teaser plugin
|
||||
:width: 50%
|
||||
|
||||
===================================== ============
|
||||
Property Type
|
||||
===================================== ============
|
||||
templateType_ ``string``
|
||||
templatePreset_ ``string``
|
||||
templateRootFile_ ``string``
|
||||
templateRootPath_ ``string``
|
||||
partialRootPath_ ``string``
|
||||
layoutRootPath_ ``string``
|
||||
===================================== ============
|
||||
|
||||
|
||||
.. _templateType:
|
||||
|
||||
templateType
|
||||
""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
templateType
|
||||
Data type
|
||||
string
|
||||
Default
|
||||
preset
|
||||
Description
|
||||
Defines the type of templating. The following types are supported:
|
||||
|
||||
* ``preset`` (default)
|
||||
* ``file``
|
||||
* ``directory``
|
||||
|
||||
.. _templatePreset:
|
||||
|
||||
templatePreset
|
||||
""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
templatePreset
|
||||
Data type
|
||||
string
|
||||
Description
|
||||
Only available when templateType is set to ``preset``.
|
||||
Name of preset to use. The given preset name must be configured in TypoScript setup.
|
||||
|
||||
|
||||
.. _templateRootFile:
|
||||
|
||||
templateRootFile
|
||||
""""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
templateRootFile
|
||||
Data type
|
||||
string
|
||||
Description
|
||||
Only available when templateType is set to ``file``.
|
||||
Full path (relative to TYPO3 root) to Fluid template file (incl. filename).
|
||||
|
||||
|
||||
.. _templateRootPath:
|
||||
|
||||
templateRootPath
|
||||
""""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
templateRootPath
|
||||
Data type
|
||||
string
|
||||
Description
|
||||
Only available when templateType is set to ``directory``.
|
||||
Path to Fluid template directory, which contains the folder "Teaser", which contains the "Index.html" file.
|
||||
In this template mode, the directory contents must match Controller/Actions of pw_teaser.
|
||||
|
||||
|
||||
|
||||
|
||||
.. _partialRootPath:
|
||||
|
||||
partialRootPath
|
||||
"""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
partialRootPath
|
||||
Data type
|
||||
string
|
||||
Description
|
||||
Set an additional root path for partials, added after pw_teaser partial root path.
|
||||
In TypoScript you can also use ``partialRootPaths`` and define several partial paths. This setting is only used,
|
||||
when ``partialRootPaths`` (from TypoScript) is empty.
|
||||
|
||||
|
||||
.. _layoutRootPath:
|
||||
|
||||
layoutRootPath
|
||||
""""""""""""""
|
||||
.. container:: table-row
|
||||
|
||||
Property
|
||||
layoutRootPath
|
||||
Data type
|
||||
string
|
||||
Description
|
||||
See ``partialRootPath`` for details. Same rules apply for this option.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 15 KiB |
61
typo3conf/ext/pw_teaser/Documentation/FirstSteps/Index.rst
Normal file
@@ -0,0 +1,61 @@
|
||||
.. include:: ../Includes.txt
|
||||
|
||||
.. _firstSteps:
|
||||
|
||||
|
||||
First steps
|
||||
===========
|
||||
|
||||
Create the first teaser
|
||||
-----------------------
|
||||
|
||||
Go to any page you want to add a teaser list of pages, and **add a new page teaser plugin**:
|
||||
|
||||
.. image:: Images/add-plugin.png
|
||||
:alt: pw_teaser in new content element wizard in TYPO3 backend
|
||||
|
||||
On tab "Plugin" you see all settings pw_teaser has:
|
||||
|
||||
.. image:: Images/plugin-sheet-general.png
|
||||
:alt: General preferences of pw_teaser plugin
|
||||
|
||||
|
||||
Define data source
|
||||
------------------
|
||||
|
||||
First, we define which pages we want to display. We can choose between those **teaser sources**:
|
||||
|
||||
- Childpages of current page
|
||||
- Childpages of current page (recursively)
|
||||
- Selected pages
|
||||
- Childpages of selected pages
|
||||
- Childpages of selected pages (recursively)
|
||||
|
||||
When you change the source to "selected pages", a new field **Custom pages** appears after reloading:
|
||||
|
||||
.. image:: Images/custom-pages.png
|
||||
:alt: Define custom pages when pw_teaser source is "selected pages"
|
||||
|
||||
Here you select page(s) from the page tree which should be used as the source for your teaser list.
|
||||
|
||||
|
||||
Make further options
|
||||
--------------------
|
||||
|
||||
In visibility options, you can filter or change the ordering of pages in the result.
|
||||
Under tab "Template" you can choose from some template presets.
|
||||
|
||||
|
||||
See the teaser in frontend
|
||||
--------------------------
|
||||
|
||||
**That's it!** Congratulations, you've configured your first page teaser!
|
||||
|
||||
In frontend you get a list with pages:
|
||||
|
||||
.. image:: Images/default-frontend-output.png
|
||||
:alt: Default frontend output of pw_teaser
|
||||
:width: 50%
|
||||
:class: with-border
|
||||
|
||||
Checkout :ref:`templates` for info about how to provide your own templates.
|
||||
17
typo3conf/ext/pw_teaser/Documentation/Includes.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
.. This is 'Includes.txt'. It is included at the very top of each and
|
||||
every ReST source file in THIS documentation project (= manual).
|
||||
|
||||
.. role:: aspect (emphasis)
|
||||
.. role:: html(code)
|
||||
.. role:: js(code)
|
||||
.. role:: php(code)
|
||||
.. role:: sep (strong)
|
||||
.. role:: sql(code)
|
||||
.. role:: typoscript(code)
|
||||
.. role:: yaml(code)
|
||||
|
||||
.. role:: ts(typoscript)
|
||||
:class: typoscript
|
||||
|
||||
.. default-role:: code
|
||||
.. highlight:: php
|
||||
60
typo3conf/ext/pw_teaser/Documentation/Index.rst
Normal file
@@ -0,0 +1,60 @@
|
||||
.. include:: Includes.txt
|
||||
|
||||
|
||||
.. _start:
|
||||
|
||||
=============================================================
|
||||
Page Teaser (with Fluid)
|
||||
=============================================================
|
||||
|
||||
.. only:: html
|
||||
|
||||
:Classification:
|
||||
pw_teaser
|
||||
|
||||
:Version:
|
||||
|release|
|
||||
|
||||
:Language:
|
||||
en
|
||||
|
||||
:Description:
|
||||
Create powerful, dynamic page teasers with data from page properties and its content elements. Based on Extbase and Fluid Template Engine.
|
||||
|
||||
:Keywords:
|
||||
TYPO3 CMS, teaser, pages, sitemap
|
||||
|
||||
:Copyright:
|
||||
2010-2020
|
||||
|
||||
:Author:
|
||||
Armin Vieweg
|
||||
|
||||
:Email:
|
||||
armin@v.ieweg.de
|
||||
|
||||
:License:
|
||||
This document is published under the Open Content License
|
||||
available from http://www.opencontent.org/opl.shtml
|
||||
|
||||
:Rendered:
|
||||
|today|
|
||||
|
||||
The content of this document is related to TYPO3,
|
||||
a GNU/GPL CMS/Framework available from `www.typo3.org <http://www.typo3.org/>`_.
|
||||
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:titlesonly:
|
||||
|
||||
Installation/Index
|
||||
FirstSteps/Index
|
||||
Configuration/Index
|
||||
UsingTypoScript/Index
|
||||
Templates/Index
|
||||
SignalSlot/Index
|
||||
Versions/Index
|
||||
Support/Index
|
||||
|
After Width: | Height: | Size: 5.7 KiB |
33
typo3conf/ext/pw_teaser/Documentation/Installation/Index.rst
Normal file
@@ -0,0 +1,33 @@
|
||||
.. include:: ../Includes.txt
|
||||
|
||||
.. _installation:
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Download
|
||||
--------
|
||||
|
||||
You can use the TER (TYPO3 Extension Repository) or Composer to fetch ``t3/pw_teaser`` package.
|
||||
|
||||
- TER: https://extensions.typo3.org/extension/pw_teaser
|
||||
- Packagist: https://packagist.org/packages/t3/pw_teaser
|
||||
|
||||
Don't forget to enable the extension in Extension Manager!
|
||||
|
||||
|
||||
TypoScript Setup
|
||||
----------------
|
||||
|
||||
When pw_teaser is successfully installed, you need to **include the provided TypoScript** to your TypoScript template:
|
||||
|
||||
.. image:: Images/include-static-typoscript.png
|
||||
:alt: Include static TypoScript of pw_teaser
|
||||
|
||||
|
||||
.. important::
|
||||
When you don't include the pw_teaser TypoScript, plugin settings like "Template preset" remain empty.
|
||||
|
||||
|
||||
That's it. Now, pw_teaser is ready to get used.
|
||||
4
typo3conf/ext/pw_teaser/Documentation/Settings.cfg
Normal file
@@ -0,0 +1,4 @@
|
||||
[general]
|
||||
|
||||
project = Page Teaser (with Fluid)
|
||||
release = latest
|
||||
35
typo3conf/ext/pw_teaser/Documentation/Settings.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
# This is the project specific Settings.yml file.
|
||||
# Place Sphinx specific build information here.
|
||||
# Settings given here will replace the settings of 'conf.py'.
|
||||
|
||||
|
||||
---
|
||||
conf.py:
|
||||
copyright: 2010-2020
|
||||
project: Page Teaser (with Fluid)
|
||||
version: 5.0
|
||||
release: 5.0.1
|
||||
latex_documents:
|
||||
- - Index
|
||||
- pw_teaser.tex
|
||||
- 'Page Teaser (with Fluid)'
|
||||
- Armin Vieweg
|
||||
- manual
|
||||
latex_elements:
|
||||
papersize: a4paper
|
||||
pointsize: 10pt
|
||||
preamble: \usepackage{typo3}
|
||||
intersphinx_mapping:
|
||||
t3api:
|
||||
- http://docs.typo3.org/typo3cms/CoreApiReference/
|
||||
- null
|
||||
t3tsref:
|
||||
- http://docs.typo3.org/typo3cms/TyposcriptReference/
|
||||
- null
|
||||
t3start:
|
||||
- http://docs.typo3.org/typo3cms/GettingStartedTutorial/
|
||||
- null
|
||||
t3editors:
|
||||
- http://docs.typo3.org/typo3cms/EditorsTutorial/
|
||||
- null
|
||||
...
|
||||
44
typo3conf/ext/pw_teaser/Documentation/SignalSlot/Index.rst
Normal file
@@ -0,0 +1,44 @@
|
||||
.. include:: ../Includes.txt
|
||||
|
||||
.. _signal-slot:
|
||||
|
||||
|
||||
Signal/Slot
|
||||
===========
|
||||
|
||||
pw_teaser provides a signal, that may be used by your extensions **to modify the pages array** (or containing pages)
|
||||
right **before assigning to view**.
|
||||
|
||||
To connect your slot to the signal just put this to your ``ext_localconf.php``:
|
||||
|
||||
::
|
||||
|
||||
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
|
||||
$signalSlotDispatcher->connect(
|
||||
\PwTeaserTeam\PwTeaser\Controller\TeaserController::class,
|
||||
'indexActionModifyPages',
|
||||
\Vendor\ExtensionName\Signals\PwTeaserSignal::class,
|
||||
'modifyPages'
|
||||
);
|
||||
|
||||
The class you have referenced should look like this:
|
||||
|
||||
::
|
||||
|
||||
<?php
|
||||
namespace Vendor\ExtensionName\Signals;
|
||||
|
||||
class PwTeaserSignal
|
||||
{
|
||||
/**
|
||||
* @param array<\PwTeaserTeam\PwTeaser\Domain\Model\Page> $pages Referenced array of pages
|
||||
* @param \PwTeaserTeam\PwTeaser\Controller\TeaserController $teaserController
|
||||
* @return void
|
||||
*/
|
||||
public function modifyPages(array &$pages, PwTeaserTeam\PwTeaser\Controller\TeaserController $teaserController) {
|
||||
// Do whatever you want with referenced array in $pages
|
||||
}
|
||||
}
|
||||
|
||||
Because of the referenced array, all changes you do in the array will also take effect in pw_teaser extension.
|
||||
You don't need to return anything.
|
||||
28
typo3conf/ext/pw_teaser/Documentation/Support/Index.rst
Normal file
@@ -0,0 +1,28 @@
|
||||
.. include:: ../Includes.txt
|
||||
|
||||
.. _support:
|
||||
|
||||
|
||||
Support
|
||||
=======
|
||||
|
||||
Issue tracker
|
||||
-------------
|
||||
See all open tasks `here`_ in the forge bug tracker.
|
||||
|
||||
.. _here: https://forge.typo3.org/projects/extension-pw_teaser/issues
|
||||
|
||||
|
||||
Donate
|
||||
------
|
||||
If you like the pw_teaser extension, feel free to `donate`_ some funds to support further development.
|
||||
|
||||
.. _donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2DCCULSKFRZFU
|
||||
|
||||
|
||||
Contribute
|
||||
----------
|
||||
If you are a developer and you want to submit improvements as code, you can fork https://bitbucket.org/ArminVieweg/pw_teaser/src
|
||||
and make a pull request to pw_teaser's master branch.
|
||||
|
||||
Thanks!
|
||||
|
After Width: | Height: | Size: 987 B |
|
After Width: | Height: | Size: 3.0 KiB |
189
typo3conf/ext/pw_teaser/Documentation/Templates/Index.rst
Normal file
@@ -0,0 +1,189 @@
|
||||
.. include:: ../Includes.txt
|
||||
|
||||
.. _templates:
|
||||
|
||||
|
||||
Templates
|
||||
=========
|
||||
|
||||
.. contents:: :local:
|
||||
|
||||
|
||||
.. _template-types:
|
||||
|
||||
Template types
|
||||
--------------
|
||||
|
||||
pw_teaser uses Fluid templates and offers three templateTypes to choose from.
|
||||
|
||||
|
||||
Type: Preset
|
||||
~~~~~~~~~~~~
|
||||
|
||||
The preset template mode is new (since 5.0) and offers the possibility to **define presets in TypoScript**.
|
||||
Also, it provides a select box in plugin settings to **choose a preset**.
|
||||
|
||||
pw_teaser provide three presets by default:
|
||||
|
||||
- ``default``
|
||||
- ``headlineAndImage``
|
||||
- ``headlineOnly``
|
||||
|
||||
|
||||
**This is how you register a new preset in TypoScript:**
|
||||
|
||||
::
|
||||
|
||||
plugin.tx_pwteaser {
|
||||
view {
|
||||
presets {
|
||||
headlineAndImage {
|
||||
label = Headline & Images
|
||||
templateRootFile = EXT:pw_teaser/Resources/Private/Templates/HeadlineAndImage.html
|
||||
partialRootPaths.10 = EXT:pw_teaser/Resources/Private/Partials
|
||||
layoutRootPaths.10 = EXT:pw_teaser/Resources/Private/Layouts
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.. tip::
|
||||
The label supports ``LLL:`` references.
|
||||
|
||||
.. note::
|
||||
Changes in TypoScript require to clear the system caches of TYPO3.
|
||||
|
||||
In plugin settings, the dropdown let the editor choose, which preset to use in frontend:
|
||||
|
||||
.. image:: Images/preset-dropdown.png
|
||||
:alt: Preset selection in pw_teaser plugin settings
|
||||
|
||||
|
||||
Type: File
|
||||
~~~~~~~~~~
|
||||
|
||||
When ``view.templateType`` is set to ``file``, you also need to provide a ``view.templateRootFile`` (Fluid template file).
|
||||
|
||||
|
||||
Type: Directory
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
When ``view.templateType`` is set to ``directory``, you also need to provide a ``view.templateRootPath`` (directory).
|
||||
In this directory you need to provide the controller/action structure of pw_teaser:
|
||||
|
||||
|
||||
.. image:: Images/directory-structure.png
|
||||
:alt: Required directory structure of pw_teaser, when using templateType 'directory'.
|
||||
|
||||
|
||||
.. _writing-templates:
|
||||
|
||||
Writing templates
|
||||
-----------------
|
||||
|
||||
The only variable the Fluid template file get is ``{pages}``.
|
||||
The most simple way to output the prepared (flat) list of pages is this:
|
||||
|
||||
::
|
||||
|
||||
<ul>
|
||||
<f:for each="{pages}" as="page">
|
||||
<li>
|
||||
<f:link.page pageUid="{page.uid}" title="{page.title}">{page.title}</f:link.page>
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
|
||||
|
||||
The provided ``Page`` model got the following properties available:
|
||||
|
||||
- ``title``
|
||||
- ``subtitle``
|
||||
- ``abstract``
|
||||
- ``navTitle``
|
||||
- ``alias``
|
||||
- ``description``
|
||||
- ``author``
|
||||
- ``authorEmail``
|
||||
- ``keywords`` as array with each keyword as string
|
||||
- ``keywordsAsString``
|
||||
- ``media``
|
||||
- ``newUntil``
|
||||
- ``isNew``
|
||||
- ``creationDate``
|
||||
- ``tstamp``
|
||||
- ``lastUpdated``
|
||||
- ``starttime``
|
||||
- ``endtime``
|
||||
- ``doktype``
|
||||
- ``sorting``
|
||||
- ``l18nConfiguration``
|
||||
- ``categories``
|
||||
- ``isCurrentPage``
|
||||
- ``rootLine`` Returns rootLine of this page as array
|
||||
- ``rootLineDepth`` Returns amount of parent pages, including this page itself. The root page (not id=0) got depth 1.
|
||||
- ``recursiveRootLineOrdering`` Returns string of sortings of all root pages including this page.
|
||||
- ``pageRow``
|
||||
- ``contents`` (only available, when ``loadContents`` set to ``1``)
|
||||
- ``childPages`` (only available, when ``pageMode`` set to ``nested``)
|
||||
- ``get``
|
||||
|
||||
You can access any property the ``pages`` table got, using the ``get`` keyword. Example:
|
||||
|
||||
::
|
||||
|
||||
{page.get.tx_myext_whatever}
|
||||
|
||||
|
||||
.. note::
|
||||
In the past, the ``get`` keyword wasn't necessary, because Fluid allowed to utilize ``__call()`` method of PHP,
|
||||
which is no longer the case.
|
||||
|
||||
|
||||
getContent ViewHelper
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The pw_teaser extension provides a view helper called ``pw:getContent``.
|
||||
This view helper allows you to access special content elements from the current page in the loop.
|
||||
|
||||
The page has the attribute "contents". You may access it like this:
|
||||
|
||||
::
|
||||
|
||||
{page.contents}
|
||||
|
||||
|
||||
But it contains just an array (query result) with all content elements located under the given page.
|
||||
It does not respect the column or the CType. This is where getContent comes into play.
|
||||
|
||||
**Full example:**
|
||||
|
||||
::
|
||||
|
||||
{namespace pw=PwTeaserTeam\PwTeaser\ViewHelpers}
|
||||
<f:for each="{pages}" as="page">
|
||||
<div class="page">
|
||||
<h3>{page.title}</h3>
|
||||
<pw:getContent contents="{page.contents}" as="content" colPos="0" cType="textpic" index="0">
|
||||
<f:for each="{content.image}" as="image" iteration="iterator">
|
||||
<f:if condition="{iterator.isFirst} == 1">
|
||||
<f:image src="{image.uid}" treatIdAsReference="1" width="400c" height="100c" />
|
||||
</f:if>
|
||||
</f:for>
|
||||
</pw:getContent>
|
||||
</div>
|
||||
</f:for>
|
||||
|
||||
**pw:getContent arguments explained:**
|
||||
|
||||
- ``contents="{page.contents}"`` - Here you pass all content elements to the view helper
|
||||
- ``as="content"`` - Here you define how to call the single content item inside of the view helper
|
||||
- ``colPos="0"`` - Limit the content elements to given colPos (0 is default)
|
||||
- ``cType="textpic"`` - Limit the content elements to given CType (eg. image, text or textpic)
|
||||
- ``index="0"`` - Limit the output to n-th elements. Zero means the first element. Keep it empty for all matching elements.
|
||||
|
||||
When accessing images from content elements (or pages either) you can use a ``<f:for>`` loop and its option "iteration"
|
||||
to limit output to one image. Therefore the example above has another <f:for>-loop inside of the getContent view helper.
|
||||
|
||||
.. important::
|
||||
This just works if you enable the option in Page Teaser Plugin, to load content elements.
|
||||
@@ -0,0 +1,87 @@
|
||||
.. include:: ../Includes.txt
|
||||
|
||||
.. _using-typoscript:
|
||||
|
||||
|
||||
Using TypoScript
|
||||
================
|
||||
|
||||
.. contents:: :local:
|
||||
|
||||
|
||||
Predefine settings with TS
|
||||
--------------------------
|
||||
|
||||
You may predefine some settings which are used in pw_teaser, unless it **will be overwritten by plugin settings**.
|
||||
|
||||
To do this, just write this in TypoScript setup:
|
||||
|
||||
::
|
||||
|
||||
plugin.tx_pwteaser.settings.[setting] = value
|
||||
|
||||
plugin.tx_pwteaser.view.[setting] = value
|
||||
|
||||
|
||||
.. hint::
|
||||
See the configuration :ref:`configuration_reference`, which settings are available.
|
||||
|
||||
|
||||
Add a whole page teaser with TS
|
||||
-------------------------------
|
||||
|
||||
If you want to add a page teaser in areas on your page, which are not editable by users, you can simply use typoscript
|
||||
to assign it to a marker or variable (i.e.) of your template. You could put it in a COA too, of course.
|
||||
|
||||
**Example:**
|
||||
|
||||
::
|
||||
|
||||
10 = COA
|
||||
10 {
|
||||
10 = TEXT
|
||||
10.value = Latest News (based on pages)
|
||||
|
||||
20 < lib.tx_pwteaser
|
||||
20 {
|
||||
settings {
|
||||
# see configuration reference
|
||||
}
|
||||
view {
|
||||
# see configuration reference
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.. important::
|
||||
The ``lib.tx_pwteaser`` is only available when you have **included the static template** to your TYPO3 template.
|
||||
|
||||
|
||||
Using parsed TypoScript
|
||||
-----------------------
|
||||
|
||||
You may use typoscript for aby pw_teaser setting.
|
||||
|
||||
**For example:**
|
||||
|
||||
::
|
||||
|
||||
plugin.tx_pwteaser.settings {
|
||||
source = customPages
|
||||
customPages = CONTENT
|
||||
customPages {
|
||||
table = pages
|
||||
select {
|
||||
pidInList = 1
|
||||
recursive = 50
|
||||
where = whatever=1337
|
||||
}
|
||||
renderObj = COA
|
||||
renderObj.10 = TEXT
|
||||
renderObj.10.field = uid
|
||||
renderObj.10.wrap = | ,|*| ,| |*|
|
||||
}
|
||||
}
|
||||
|
||||
This example creates a comma-separated list for the setting "customPages". Unlikely to default Extbase behavior, the
|
||||
defined settings are parsed by TypoScript parser, before used in Extbase controller.
|
||||
115
typo3conf/ext/pw_teaser/Documentation/Versions/Index.rst
Normal file
@@ -0,0 +1,115 @@
|
||||
.. include:: ../Includes.txt
|
||||
|
||||
|
||||
.. _versions:
|
||||
|
||||
Versions
|
||||
========
|
||||
|
||||
.. contents:: :local:
|
||||
|
||||
5.0.1
|
||||
-----
|
||||
|
||||
- [BUGFIX] Fix wrong extension icon path
|
||||
- [DEVOPS] Update DDEV install scripts (for TYPO3 environments)
|
||||
- [BUGFIX] Do not show warning in ItemsProcFunc, if pw_teaser typoscript is missing
|
||||
- [BUGFIX] Fix wrong Extbase mapping (for TYPO3 10+)
|
||||
- [TASK] Update README
|
||||
|
||||
|
||||
5.0.0
|
||||
-----
|
||||
|
||||
- [FEATURE] Documentation
|
||||
- [BUGFIX] Remove default value for setting "hideCurrentPage" in teaser flexform
|
||||
- [TASK] Set templateType by default to "preset"
|
||||
- [TASK] Remove "ENABLECACHE" extension setting
|
||||
- [BUGFIX] Fix image viewhelper usage in Fluid template
|
||||
- [FEATURE] Template presets
|
||||
- [BUGFIX] Merge view settings from plugin with typoscript
|
||||
- [TASK] Set label for default value in dropdowns
|
||||
- [BUGFIX] Streamline "templateRootPaths" setting
|
||||
- [TASK] Update copyrights
|
||||
- [TASK] Code style fixing
|
||||
- [BUGFIX] Custom fluid templates not working because of missing templateRootPath
|
||||
- [TASK] Move ext_tables.php contents to TCA/Overrides
|
||||
- [FEATURE] Add TYPO3 10 compatibility
|
||||
- Dropped support for TYPO3 8.7
|
||||
|
||||
|
||||
4.0.0
|
||||
-----
|
||||
|
||||
- [BUGFIX] No not escape output of GetContent ViewHelper
|
||||
- [CHANGE][!!!] Introduce {page.get}
|
||||
- [TASK] Compatibility Fixes
|
||||
- [TASK] Set version to 4.0.0-dev and update package name to "t3/pw_teaser"
|
||||
- Dropped support for TYPO3 6.2 and 7.6
|
||||
|
||||
3.4.2
|
||||
-----
|
||||
|
||||
- [TASK] Fix license attribute in composer.json
|
||||
- [BUGFIX] Fix missing index attributes in numIndex nodes
|
||||
|
||||
|
||||
3.4.1
|
||||
-----
|
||||
|
||||
- [BUGFIX] Check for version 7.5 to use IconRegistry, fallback for TYPO3 6.2
|
||||
|
||||
|
||||
3.4.0
|
||||
-----
|
||||
|
||||
- Add support for TYPO3 7.6 to 8.x. Also added content element wizard entry.
|
||||
|
||||
|
||||
3.3.0
|
||||
-----
|
||||
|
||||
Add new option "pageMode". Normally pages are passed as flat array to fluid template.
|
||||
If this option is set to "nested" you get a nested page object with (new attribute) childPages.
|
||||
|
||||
|
||||
3.2.0
|
||||
-----
|
||||
|
||||
- Add new option "recursionDepthFrom" to define a start for recursion.
|
||||
|
||||
|
||||
3.1.0
|
||||
-----
|
||||
|
||||
Page and content model in pw_teaser does not have properties for all available columns in the accordant tables.
|
||||
With this patch, everytime you try to access such attribute the whole row of the page/content will be loaded (and cached)
|
||||
and the values will be accessible.
|
||||
|
||||
Example in fluid template:
|
||||
|
||||
::
|
||||
|
||||
<f:for each="{pages}" as="page">
|
||||
Page Layout: {page.layout}
|
||||
</f:for>
|
||||
|
||||
Layout is one of these attributes, existing in pages table but not in page model.
|
||||
So this example will not work with previous versions of pw_teaser.
|
||||
Furthermore now also attributes added by other extensions are accessible.
|
||||
|
||||
|
||||
3.0.0
|
||||
-----
|
||||
|
||||
- Complete TYPO3 6.2 support
|
||||
- Massive refactoring of all classes (eg. namespaces)
|
||||
- Add language support (behavior of teasers like menu items in TYPO3)
|
||||
- Add categories attribute to Page and Content model
|
||||
- $page->getMedia() and $content->getImage() works with FAL (To work in template use $page->getMediaFiles() or $content->getImageFiles())
|
||||
- Add option to plugin to filter pages by categories
|
||||
- Add option to plugin to define recursion depth
|
||||
- Add getRootLine() and getRootLineDepth() to Page model
|
||||
- New extension/plugin icon
|
||||
- New Signal/Slot to modify found pages
|
||||
- Many bugfixes
|
||||