TYPO3 Logo
TypoScript Explained
Options
Give feedback View source How to edit Edit on GitHub Full documentation (single file)

TypoScript Explained

About TypoScript

  • Introduction
  • Getting started
    • Quick overview
    • First steps
    • Page
    • Content records
    • Create a menu with TypoScript
    • fluid_styled_content
    • TypoScript objects
      • Objects executing database queries
      • Objects rendering content
      • Further objects
    • TypoScript functions
      • stdWrap
      • getText / data
      • imgResource
      • select
      • split
      • if
      • typolink
      • parseFunc
    • Next steps
  • Usage
    • TypoScript in Sites
    • TypoScript in Extensions
    • Backend Module
    • Access TypoScript in an extension
    • Constants
    • Register
    • Debugging / analyzing
  • Using and setting TSconfig
    • Setting page TSconfig
    • Setting user TSconfig
    • Conditions
    • PHP API
  • Syntax
    • Identifiers
    • Code blocks
    • Operators
    • Comments
    • Conditions
    • File imports
    • String formats
    • TSconfig differences

Frontend TypoScript

  • Page
    • PAGE Examples
  • Content Objects (cObject)
    • Content objects (general information)
    • CASE
    • Content object array - COA, COA_INT
    • CONTENT
    • EXTBASEPLUGIN
    • FILES
    • FLUIDTEMPLATE
    • HMENU
      • TMENU
        • TMENUITEM
    • IMAGE
      • GIFBUILDER
        • Examples
        • Colors in TypoScript GIFBUILDER
        • Note on (+calc)
        • Properties
        • GIFBUILDER objects
          • ADJUST
          • BOX
          • CROP
          • EFFECT
          • ELLIPSE
          • EMBOSS
          • IMAGE
          • OUTLINE
          • SCALE
          • SHADOW
          • TEXT
          • WORKAREA
    • IMG_RESOURCE
    • LOAD_REGISTER
    • PAGEVIEW
    • RECORDS
    • RESTORE_REGISTER
    • SVG
    • TEXT
    • USER and USER_INT
  • Data processors
    • comma-separated-value
    • database-query
    • files
    • flex-form
    • gallery
    • language-menu
    • menu
      • Browse
      • Categories
      • Directory
      • Keywords
      • Language
      • List
      • Rootline / Breadcrumb
      • Updated
      • Userfunction
    • page-content
    • record-transformation
    • site
    • site-language
    • split
    • Custom data processors
  • Config
  • Top-level objects
    • page & config
    • module
    • plugin
    • Reserved top-level objects
  • Functions
    • cache
    • Calc
    • Data / getText
    • encapsLines
    • getEnv
    • HTMLparser
    • HTMLparser_tags
    • if
    • imageLinkWrap
    • imgResource
    • makelinks
    • numberFormat
    • numRows
    • optionSplit
    • parseFunc
    • replacement
    • round
    • select
    • split
    • stdWrap
    • strPad
    • tags
    • typolink
    • Wrap
  • Conditions

Backend TypoScript

  • Page TSconfig Reference
    • colorPalettes
    • mod
      • SHARED
      • web_info
      • web_layout
        • Backend layouts
      • web_list
      • web_view
      • wizards
    • options
    • RTE
    • TCAdefaults
    • TCEFORM
    • TCEMAIN
    • templates
    • tx_*
  • User TSconfig reference
    • admPanel (EXT:adminpanel)
    • auth
    • options
    • page
    • permissions
    • setup
    • TCAdefaults
    • tx_*

Appendix

  • PHP and TypoScript
  • Glossary
  • Sitemap
  1. TypoScript Explained
  2. Data processors
  3. menu
  4. Keywords
Give feedback Edit on GitHub

Keywords - menu of related pages

Makes a menu of pages, which contain one or more keywords also found on the current page.

Mount pages are supported.

  • Properties
  • Examples
    • Example: Menu of related pages
    • Example: Find related pages of the current page

Properties

Name Type Default
special.value
integer /stdWrap
special.mode
string SYS_LASTCHANGED
special.entryLevel
integer
special.depth
integer 20
special.limit
integer 10
special.excludeNoSearchPages
boolean false
special.begin
boolean
special.setKeywords
string /stdWrap
special.keywordsField
string keywords
special.keywordsField.sourceField
string keywords

special.value

special.value
Type
integer /stdWrap
Example
Example: Find related pages of the current page

UID of the page for which related pages by keyword should be found.

special.mode

special.mode
Type
string
Default
SYS_LASTCHANGED

Which field in the pages table should be used for sorting?

Possible values are:

SYS_LASTCHANGED
Is updated to the youngest time stamp of the records on the page when a page is generated.
manual or lastUpdated
Uses the field lastUpdated, which can be set manually in the page record.
tstamp
Uses the tstamp field of the page record, which is set automatically when the record is changed.
crdate
Uses the crdate field of the page record. This field is set once on creation of the record and left unchanged afterwards.
starttime
Uses the starttime field.

special.entryLevel

special.entryLevel
Type
integer

Where in the root line the search begins.

See property entryLevel in the HMENU.

special.depth

special.depth
Type
integer
Default
20

Same as in section "special = updated".

special.limit

special.limit
Type
integer
Default
10

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

special.excludeNoSearchPages

special.excludeNoSearchPages
Type
boolean
Default
false

If set, pages marked No search are not included.

special.begin

special.begin
Type
boolean

special.setKeywords

special.setKeywords
Type
string /stdWrap

Lets you define the keywords manually by defining them as a comma- separated list. If this property is defined, it overrides the default, which is the keywords of the current page.

special.keywordsField

special.keywordsField
Type
string
Default
keywords

Defines the field in the pages table in which to search for the keywords. Default is the field name keyword. No check is done to see if the field you enter here exists, so make sure to enter an existing field.

special.keywordsField.sourceField

special.keywordsField.sourceField
Type
string
Default
keywords

Defines the field from the current page from which to take the keywords being matched. The default is keyword. (Notice that special.setKeywords is only setting the page record field to search in!)

Examples

Example: Menu of related pages

The content element Menu > Related pages provided by the system Extension EXT:fluid_styled_content is configured with a MenuProcessor which is based on the options of the HMENU and provides all its properties:

EXT:fluid_styled_content/Configuration/TypoScript/ContentElement/MenuRelatedPages.typoscript
# Related pages (based on keywords):
# ...
#
# CType: menu_related_pages

tt_content.menu_related_pages =< lib.contentElement
tt_content.menu_related_pages {
    templateName = MenuRelatedPages
    dataProcessing {
        10 = menu
        10 {
            special = keywords
            special {
                value.field = pages
                excludeNoSearchPages = 1
            }
            alternativeSortingField = title
            dataProcessing {
                10 = files
                10 {
                    references.fieldName = media
                }
            }
        }
    }
}
Copied!

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

EXT:fluid_styled_content/Resources/Private/Templates/MenuRelatedPages.html
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="Main">

    <f:if condition="{menu}">
        <ul>
            <f:for each="{menu}" as="page">
                <li>
                    <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')}{f:if(condition: page.current, then: ' aria-current="page"')} title="{page.title}">
                        <span>{page.title}</span>
                    </a>
                </li>
            </f:for>
        </ul>
    </f:if>

</f:section>
</html>
Copied!

Example: Find related pages of the current page

EXT:site_package/Configuration/TypoScript/setup.typoscript
lib.relatedPagesMenu = HMENU
lib.relatedPagesMenu {
    special = keywords
    special {
        value.data = TSFE:id
        entryLevel = 1
        mode = manual
    }
    // render the menu
}
Copied!
  • Previous
  • Next
Reference to the headline

Copy and freely share the link

This link target has no permanent anchor assigned. You can make a pull request on GitHub to suggest an anchor. The link below can be used, but is prone to change if the page gets moved.

Copy this link into your TYPO3 manual.

  • Home
  • Contact
  • Issues
  • Repository

Last rendered: May 18, 2025 11:08

© since 2012 by the TYPO3 contributors
  • Legal Notice
  • Privacy Policy