webmaxsk/maxdocuments

Simple documents for any data object.

Installs: 291

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 4

Forks: 1

Open Issues: 0

Type:silverstripe-vendormodule

dev-master 2018-08-05 13:50 UTC

This package is auto-updated.

Last update: 2024-03-27 02:49:30 UTC


README

Simple documents for any data object

Installation

composer require "webmaxsk/maxdocuments:*"

You can add docs to any Page via CMS. You can disable docs for any Page subclass by adding config to mysite/_config.php:

SilverStripe\ErrorPage\ErrorPage:
  documents:
    enabled: false
SilverStripe\CMS\Model\VirtualPage:
  documents:
    enabled: false
SilverStripe\CMS\Model\RedirectorPage:
  documents:
    enabled: false

The maximum number of docs can be also specified in the config using the following syntax (default is 20 for a page):

SilverStripe\Blog\Model\BlogPost:
  documents:
    count: 50

You can add docs to any DataObject too, just extend DataObject with ObjectDocumentsExtension.

Usage

Add docs to your template

<% include FilesToDownload %>

Example usage

check https://github.com/Webmaxsk/silverstripe-intranet-plate