innoweb/silverstripe-default-home 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

innoweb/silverstripe-default-home

最新稳定版本:4.0.0

Composer 安装命令:

composer require innoweb/silverstripe-default-home

包简介

A simple module that creates a Home Page per website or MultiSites Site.

README 文档

README

Version License

Overview

This modules makes sure that the homepage for a site is always accessible through the URL segment configured in SilverStripe\CMS\Controllers\RootURLController::default_homepage_link (usually 'home'). The module also makes sure that the homepage exists and can't be unpublished or deleted. It also hides the homepage from menus (ShowInMenus=false).

This module supports single site as well as multisites and configured-multisites setups.

Requirements

  • Silverstripe CMS 6.x

Installation

Install the module using composer:

composer require innoweb/silverstripe-default-home dev-master

Then run dev/build.

Configuration

For this module to work you need to create a homepage class in your project and this module's HomePageExtension to it:

<?php

namespace Your\NameSpace;

use Innoweb\DefaultHome\Extensions\HomePageExtension;
use Page;

class HomePage extends Page
{
    private static $table_name = 'HomePage';

    private static $singular_name = "Home Page";
    private static $plural_name = "Home Pages";
    private static $description = 'Site home page';

    private static $hide_ancestor = HomePage::class;

    private static $extensions = [
        HomePageExtension::class
    ];

    ...
	
}

Then, the following configuration value needs to be set:

SilverStripe\CMS\Controllers\RootURLController:
  default_homepage_class: Your\NameSpace\Homepage

License

BSD 3-Clause License, see License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2020-07-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固