Skip to content

Latest commit

 

History

History
executable file
·
65 lines (46 loc) · 2.45 KB

README.md

File metadata and controls

executable file
·
65 lines (46 loc) · 2.45 KB

Page View Counter Plugin for Flextype

Version License Total downloads Flextype Discord

Page View Counter plugin will help you to know how many readers of every page on your website.

Dependencies

The following dependencies need to be installed for Page View Counter Plugin.

Item Version Download
flextype 0.9.16 download
twig >=2.0.0 download

Installation

  1. Download & Install all required dependencies.
  2. Create new folder /project/plugins/page-view-counter
  3. Download Page View Counter Plugin and unzip plugin content to the folder /project/plugins/page-view-counter

Settings

Key Value Description
enabled true true or false to disable the plugin
priority 100 Page View Counter plugin priority

Documentation

Function pageViewCounter() in namespace Flextype\Plugin\PageViewCounter

/**
 * Get page view counter
 *
 * @return int
 */
function pageViewCounter(): int

Usage

Display page view counter in the twig templates

{{ pageViewCounter() }}

Display page view counter in the entry content

[pageViewCounter]

Display page view counter in the php

echo Flextype\Plugin\PageViewCounter\pageViewCounter();

LICENSE

The MIT License (MIT) Copyright (c) 2021 Sergey Romanenko