User conditions
User conditions can be used in the TypoScript setup. DCE provides such a user condition:
DceOnCurrentPage
This user condition checks if the current page contains a content element based on given DCE.
Usage in TypoScript:
[dceOnCurrentPage("teaser")]
page.10 = TEXT
page.10.value = The current page contains a teaser DCE.
[END]
Copied!
You can use either the identifier or the uid of a DCE. The equivalent uid-based condition is:
[dceOnCurrentPage("42")]
page.10 = TEXT
page.10.value = The current page contains DCE 42.
[END]
Copied!
The condition respects the standard record restrictions and follows the page configured as content source through
content_from_pid.