From d75412051718d275e4a20f9486d2f7456272174a Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 3 Aug 2020 10:31:06 +0200 Subject: [PATCH] Use news as example for recordview tracking in docs As it most likely is the most used configuration. Therefore it should be as easy as possible. Also it matches more or less any Extbase plugin with nested structure. --- Documentation/Recordview.rst | 9 ++++----- Documentation/RecordviewWidgets/Recordviews.rst | 14 +++++++------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Documentation/Recordview.rst b/Documentation/Recordview.rst index e5fecd0..950b3aa 100644 --- a/Documentation/Recordview.rst +++ b/Documentation/Recordview.rst @@ -51,17 +51,16 @@ Let us examine an concrete example:: public: true arguments: $rules: - topics: + news: matches: > - request.getQueryParams()["topic_id"] > 0 + request.getQueryParams()["tx_news_pi1"] && request.getQueryParams()["tx_news_pi1"]["news"] > 0 and not (context.getAspect("backend.user").isLoggedIn()) and not (request.getHeader("User-Agent")[0] matches "/^TYPO3|TYPO3 linkvalidator/") - and not (request.getHeader("User-Agent")[0] matches "/^Codeception Testing/") 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: 'request.getQueryParams()["topic_id"]' - tableName: 'sys_category' + recordUid: '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. diff --git a/Documentation/RecordviewWidgets/Recordviews.rst b/Documentation/RecordviewWidgets/Recordviews.rst index 954572e..1fc9a68 100644 --- a/Documentation/RecordviewWidgets/Recordviews.rst +++ b/Documentation/RecordviewWidgets/Recordviews.rst @@ -28,24 +28,24 @@ Example widget configuration. :file:`Configuration/Services.yaml`:: services: - dashboard.provider.danielsiepmann.tracking.records.topics: + dashboard.provider.danielsiepmann.tracking.records.news: class: 'DanielSiepmann\Tracking\Dashboard\Provider\Recordviews' arguments: $queryBuilder: '@querybuilder.tx_tracking_recordview' - $recordTableLimitation: ['sys_category'] + $recordTableLimitation: ['tx_news_domain_model_news'] - dashboard.widget.danielsiepmann.tracking.records.topics: + dashboard.widget.danielsiepmann.tracking.records.news: class: 'TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget' arguments: $view: '@dashboard.views.widget' - $dataProvider: '@dashboard.provider.danielsiepmann.tracking.records.topics' + $dataProvider: '@dashboard.provider.danielsiepmann.tracking.records.news' tags: - name: 'dashboard.widget' - identifier: 'topicsDoughnut' + identifier: 'newsDoughnut' groupNames: 'tracking' iconIdentifier: 'content-widget-chart-pie' - title: 'Topics' - description: 'Shows which topics are called most' + title: 'News' + description: 'Shows which news are called most' additionalCssClasses: 'dashboard-item--chart' height: 'medium' width: 'small'