mirror of
https://github.com/DanielSiepmann/tracking.git
synced 2024-11-22 13:56:09 +01:00
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.
This commit is contained in:
parent
644f5f241d
commit
d754120517
2 changed files with 11 additions and 12 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue