Skip to content

Commit

Permalink
Fix wrong recordview example configuration
Browse files Browse the repository at this point in the history
The `traverse()` function takes two arguments where the 2nd is the full
path with `/` as separator.
The example was wrong and not fully adopted.
The changelog already hold the correct information.

This is now adjusted, thanks to Andrea for reporting the issue.
  • Loading branch information
DanielSiepmann committed Aug 23, 2023
1 parent 19b7fff commit 5aa08b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/Recordview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ Let us examine an concrete example::
$rules:
news:
matches: >
request.getQueryParams()["tx_news_pi1"] && request.getQueryParams()["tx_news_pi1"]["news"] > 0
traverse(request.getQueryParams(), "tx_news_pi1/news") > 0
and not (context.getAspect("backend.user").isLoggedIn())
and not (context.getAspect("frontend.preview").isPreview())
and traverse(request.getHeader("User-Agent"), '0')
and not (request.getHeader("User-Agent")[0] matches "/^TYPO3|TYPO3 linkvalidator/")
and not (request.getHeader("User-Agent")[0] matches "/Wget|curl|Go-http-client/")
and not (request.getHeader("User-Agent")[0] matches "/bot|spider|Slurp|Sogou|NextCloud-News|Feedly|XING FeedReader|SEOkicks|Seekport Crawler|ia_archiver|TrendsmapResolver|Nuzzel/")
and not (request.getHeader("User-Agent")[0] matches "/mattermost|Slackbot|WhatsApp/")
recordUid: 'traverse(request.getQueryParams(), "tx_news_pi1", "news")'
recordUid: 'traverse(request.getQueryParams(), "tx_news_pi1/news")'
tableName: 'tx_news_domain_model_news'

The first paragraph will not be explained, check out :ref:`t3coreapi:configure-dependency-injection-in-extensions` instead.
Expand Down

0 comments on commit 5aa08b5

Please sign in to comment.