Download the PHP package bnomei/kirby3-recently-modified without Composer
On this page you can find all versions of the php package bnomei/kirby3-recently-modified. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package kirby3-recently-modified
Kirby Recently Modified
Kirby Plugin to view recently modified pages by current User
Installation
- unzip master.zip as folder
site/plugins/kirby3-recently-modified
or git submodule add https://github.com/bnomei/kirby3-recently-modified.git site/plugins/kirby3-recently-modified
orcomposer require bnomei/kirby3-recently-modified
Screenshot
Section
Field
Usage
Add the section to your site or page blueprint to display a list of the most recently modified pages by the currently logged in user. The sections is not able to list the site itself since the section depends on a collection of pages for the query.
site/blueprints/site.yml
Optionally you can add the field to the site or any page blueprint to show the time and user that modified given content most recently. In contrast to the section the field is able to show most recent modified information for the site (content/site.txt
).
site/blueprints/pages/default.yml
[!WARNING] This plugin has, by default, a 1 minute cache.
Query for the Section (not Field)
The plugins section comes with a default query that shows the most recent changes made by the currently logged in user. But you can define any other query you like.
Default Query
onlyModifiedByUser
is a PagesMethod added by this plugin that filters the page collection to only those pages that were modified by the currently logged-in user. The plugin uses hooks to track what pages each user did edit.
Example 1
Example 2
TIP: You could use the
query
property,info
andlimit
settings to show any list of pages you want, just like a simplified version of the page table plugin.
Known Limitations
- You can not set multiple
text
/link
/info
settings. All instances of therecentlymodified
section share the same. - The
limit
setting is always applied. If you want some of your instances to have a smaller number of items then calllimit
inside your custom query.
Settings
bnomei.recently-modified. | Default | Description |
---|---|---|
query | ... |
see above |
link | function($page){...} |
callback to return the link |
text | function($page){...} |
callback to return the text |
info | function($page){...} |
callback to return the info |
format | fn($datetime){...} |
custom date format callback |
hooks | true |
use hooks to track users modified pages |
limit | 7 |
limit list and cache items |
expire | 1 |
cache will expire n-minutes |
Disclaimer
This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.
License
It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.