Skip to content
Snippets Groups Projects
Commit bd161dc2 authored by Benni Mack's avatar Benni Mack
Browse files

[FEATURE] Extend stdWrap.if feature

This change extends the TypoScript
function "if." (checkIf) to also allow
* "contains"
* "startsWith"
* "endsWith"

Examples:

    10 = TEXT
    10.value = Welcome to our website!
    10.if.value.data = page:title
    10.if.startsWith = Home

    10 = TEXT
    10.value = This is an article from Benji
    10.if.value.data = page:author
    10.if.endsWith = Kott

    10 = TEXT
    10.value = Watch Out for Links in this text
    10.if.value.data = field:bodytext
    10.if.contains = https://

In addition, some internal variables
in PHP are renamed to make the code
more readable.

Resolves: #99194
Releases: main
Change-Id: Ib28b9b1c83f247abdf5a2ec39c0f8f7eda0359d3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76822


Reviewed-by: default avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarNikita Hovratov <nikita.h@live.de>
parent 56c88bf4
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment