Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Overhaul HMENU updated page #1201

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 92 additions & 141 deletions Documentation/ContentObjects/Hmenu/Updated.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. include:: /Includes.rst.txt
.. index:: HMENU; special = updated
.. _hmenu-special-updated:
.. include:: /Includes.rst.txt
.. index:: HMENU; special = updated
.. _hmenu-special-updated:

=================
=============
Updated HMENU
=================
=============

An :ref:`HMENU <cobj-hmenu>` with the property :typoscript:`special = updated`
will create a menu of the most recently updated pages.
Expand All @@ -13,213 +13,164 @@ By default the most recently updated page is displayed on top.

Mount pages are supported.

.. contents::
:local:
.. contents::
:local:

.. _hmenu-special-updated-properties:

Properties
==========

.. _hmenu-special-updated-value:
.. _hmenu-special-updated-value:

special.value
--------------

.. ### BEGIN~OF~TABLE ###

.. container:: table-row

Property
special.value

Data type
list of page ids /:ref:`stdWrap <stdwrap>`
.. confval:: special.value
:name: hmenu-updated-special-value
:type: list of page IDs /:ref:`stdWrap <stdwrap>`

Description
This will generate a menu of the most recently updated pages from the
branches in the tree starting with the uid's (uid=35 and uid=56)
listed.
This will generate a menu of the most recently updated pages from the
branches in the tree starting with the UIDs (uid=35 and uid=56)
listed.

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/TypoScript/setup.typoscript
.. code-block:: typoscript
:caption: EXT:site_package/Configuration/TypoScript/setup.typoscript

20 = HMENU
20.special = updated
20.special.value = 35, 56
20 = HMENU
20.special = updated
20.special.value = 35, 56

.. _hmenu-special-updated-mode:
.. _hmenu-special-updated-mode:

special.mode
-------------

.. container:: table-row

Property
special.mode

Data type
string

Default
SYS\_LASTCHANGED
.. confval:: special.mode
:name: hmenu-updated-special-mode
:type: string
:Default: `SYS_LASTCHANGED`

Description
The field in the database which should be used to get the information
about the last update from.
The field in the database, which should be used to get the information
about the last update from.

The following values are possible:
Possible values are:

**SYS\_LASTCHANGED:** Is updated to the youngest tstamp of the
records on the page when a page is generated.
`SYS_LASTCHANGED`
Is updated to the youngest time stamp of the
records on the page when a page is generated.

**crdate:** Uses the "crdate"-field of the pagerecord.
`crdate`
Uses the :sql:`crdate` field of the page record. This field is set
once on creation of the record and left unchanged afterwards.

**tstamp:** Uses the "tstamp"-field of the pagerecord, which is set
automatically when the record is changed.
`tstamp`
Uses the :sql:`tstamp` field of the page record, which is set
automatically when the record is changed.

**manual** or **lastUpdated:** Uses the field "lastUpdated", which
can be set manually in the page-record.
`manual` or `lastUpdated`
Uses the field :sql:`lastUpdated`, which
can be set manually in the page record.

**starttime:** Uses the starttime field.
`starttime`
Uses the :sql:`starttime` field.

Fields with empty values are generally not selected.
Fields with empty values are generally not selected.

.. _hmenu-special-updated-depth:
.. _hmenu-special-updated-depth:

special.depth
-------------

.. container:: table-row
.. confval:: special.depth
:name: hmenu-updated-special-depth
:type: integer
:Default: 20

Property
special.depth
Defines the tree depth.

Data type
integer
The allowed range is 1-20.

Default
20
A depth of 1 means only the start ID, depth of 2 means start ID +
first level.

Description
Defines the tree depth.
**Note:** "depth" is relative to :confval:`hmenu-updated-special-beginAtLevel`.

The allowed range is 1-20.

A depth of 1 means only the start id, depth of 2 means start-id +
first level.

**Note:** "depth" is relative to "beginAtLevel".


.. _hmenu-special-updated-beginatlevel:
.. _hmenu-special-updated-beginatlevel:

special.beginAtLevel
---------------------

.. container:: table-row

Property
special.beginAtLevel

Data type
integer
--------------------

Default
0
.. confval:: special.beginAtLevel
:name: hmenu-updated-special-beginAtLevel
:type: integer
:Default: 0

Description
Determines starting level for the page trees generated based on .value
and .depth.
Determines starting level for the page trees generated based on .value
and .depth.

0 is default and includes the start id.
0 is default and includes the start id.

1 starts with the first row of subpages,
1 starts with the first row of subpages,

2 starts with the second row of subpages.
2 starts with the second row of subpages.

**Note:** "depth" is relative to this property.
**Note:** "depth" is relative to this property.


.. _hmenu-special-updated-maxage:
.. _hmenu-special-updated-maxage:

special.maxAge
---------------

.. container:: table-row
.. confval:: special.maxAge
:name: hmenu-updated-special-maxAge
:type: integer :ref:`+calc <objects-calc>`

Property
special.maxAge
Only show pages, whose update-date *at most* lies this number of
seconds in the past. Or with other words: Pages with update-dates
older than the current time minus this number of seconds will not
be shown in the menu no matter what.

Data type
integer :ref:`+calc <objects-calc>`
By default all pages are shown. You may use +-\*/ for calculations.

Description
Only show pages, whose update-date *at most* lies this number of
seconds in the past. Or with other words: Pages with update-dates
older than the current time minus this number of seconds will not
be shown in the menu no matter what.

By default all pages are shown. You may use +-\*/ for calculations.

.. _hmenu-special-updated-limit:
.. _hmenu-special-updated-limit:

special.limit
--------------

.. container:: table-row

Property
special.limit

Data type
integer
.. confval:: special.limit
:name: hmenu-updated-special-limit
:type: integer
:Default: 10

Default
10
Maximal number of items in the menu. Default is 10, max is 100.

Description
Maximal number of items in the menu. Default is 10, max is 100.


.. _hmenu-special-updated-excludenosearchpages:
.. _hmenu-special-updated-excludenosearchpages:

special.excludeNoSearchPages
-----------------------------

.. container:: table-row

Property
special.excludeNoSearchPages

Data type
boolean

Default
0 (false)

Description
If set, pages marked "No search" are not included.



.. ###### END~OF~TABLE ######

[tsref:(cObject).HMENU.special = updated]
.. confval:: special.excludeNoSearchPages
:name: hmenu-updated-special-excludeNoSearchPages
:type: boolean
:Default: `false`

.. _hmenu-special-updated-examples:
If set, pages marked `No search` are not included.

Example
=======
.. _hmenu-special-updated-examples:

Recently updated pages styled with Fluid
-----------------------------------------
Example: Recently updated pages styled with Fluid
=================================================

The content element :guilabel:`Recently Updated Pages` provided by the system
extension EXT:fluid_styled_content is configured with a :php:`MenuProcessor`
which is based on the options of the :ref:`HMENU <cobj-hmenu>` and provides
all its properties:

.. include:: /CodeSnippets/Menu/TypoScript/MenuRecentlyUpdated.rst.txt
.. include:: /CodeSnippets/Menu/TypoScript/MenuRecentlyUpdated.rst.txt

The following Fluid template can be used to style the menu:

.. include:: /CodeSnippets/Menu/Template/MenuRecentlyUpdated.rst.txt
.. include:: /CodeSnippets/Menu/Template/MenuRecentlyUpdated.rst.txt
Loading