承接 silverstripe/lumberjack 相关项目开发

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

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

silverstripe/lumberjack

最新稳定版本:4.0.3

Composer 安装命令:

composer require silverstripe/lumberjack

包简介

A module to make managing pages in a GridField easy without losing any of the functionality that you're used to in the CMS.

README 文档

README

CI Silverstripe supported module

A module to make managing pages in a GridField easy without losing any of the functionality that you're used to in the CMS.

This is intended to be used in cases where the SiteTree grows beyond a manageable level. eg. blogs, news sections, shops, etc.

This module was born out of and decoupled from micmania1/silverstripe-blog.

Installation

composer require silverstripe/lumberjack

Features

  • Easily define which page types to show in the SiteTree and which to manage in a GridField.
  • Keep all functionality that comes with the CMS, including versioning and preview.

Usage

In this example we have a NewsHolder page which is the root of our news section, containing NewsArticles and NewsPages. We want to display NewsPage in the site tree but we want to display NewsArticles in a GridField.

<?php

namespace MyModule\PageTypes;

use Page;
use SilverStripe\Lumberjack\Model\Lumberjack;

class NewsHolder extends Page
{
    private static $extensions = [
        Lumberjack::class,
    ];

    private static $allowed_children = [
        NewsArticle::class,
        NewsPage::class,
    ];
}
<?php

namespace MyModule\PageTypes;

use Page;

class NewsArticle extends Page
{
    private static $show_in_sitetree = false;
    private static $allowed_children = [];
}
<?php

namespace MyModule\PageTypes;

use Page;

class NewsPage extends Page
{
    private static $show_in_sitetree = true;
}

If show_in_sitetree is not explicitly defined on a class, then it will default to true. You can add this setting to core classes and modules using the YAML config system. It is not recommended to add the LumberJack extension to the SiteTree or Page class.

SilverStripe\Blog\Model\Blog:
  extensions:
    - SilverStripe\Lumberjack\Model\Lumberjack

SilverStripe\Blog\Model\BlogPost:
  show_in_sitetree: false

统计信息

  • 总下载量: 1.08M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 34
  • 点击次数: 1
  • 依赖项目数: 39
  • 推荐数: 2

GitHub 信息

  • Stars: 33
  • Watchers: 6
  • Forks: 47
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2015-02-05