承接 futjikato/readcounter 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

futjikato/readcounter

Composer 安装命令:

composer require futjikato/readcounter

包简介

Package to provide a very simple mechanism to count page impressions and save them in a page property.

README 文档

README

Package to provide a very simple mechanism to count page impressions and save them in a page property.

Installation

After downloading check in the neos backend if this package is enabled as application or plugin.

In your main Configuration/Routes.yaml add the following snippet to activate te package:

-
  name: 'Futjikato.ReadCounter'
  uriPattern: '<ReadCounterSubroutes>'
  subRoutes:
    'ReadCounterSubroutes':
      package: 'Futjikato.ReadCounter'

The route to call via ajax is /readcounter/tracking?node=<nodePath>.

Every page that should be countable must be extended by the Futjikato.ReadCounter:CounterMixin mixin:

'Futjikato.DemoSite:CountedPage':
  superTypes:
    'TYPO3.Neos.NodeTypes:Page': true
    'Futjikato.ReadCounter:CounterMixin': true
  ui:
    label: 'Counted Page'

The mixin extends the page with a readcounter property you can use as a sort property or render it somewhere on the page. In addtion the mixin also adds a child node to render the tracking code.

Here an exaple typescript page configuration:

prototype(Futjikato.DemoSite:CountedPage.Page) < prototype(Futjikato.DemoSite:Page) {
    body {
        templatePath = 'resource://Futjikato.DemoSite/Private/Templates/Page/CountedPage.html'
        parts {
            // used to render the current page read counter
            counter = ${q(documentNode).property('readcounter')}
        }
        content {
            // render a simple script tag that will track the page view
            trackingcode = Futjikato.ReadCounter:TrackingElement {
                nodePath = 'trackingcode'
            }
        }
    }
}

统计信息

  • 总下载量: 246
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固