定制 elvandar/kazetenn-pages 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

elvandar/kazetenn-pages

最新稳定版本:1.0.2

Composer 安装命令:

composer require elvandar/kazetenn-pages

包简介

A page handling bundle for symfony. Part of the Kazetenn project

README 文档

README

Description

Kazetenn Pages is a symfony bundle that allow you to handle basic pages programatically.

Installation

You can use

composer require elvandar/kazetennpages

to install the bundle.

you will also need to configure stof/doctrineextensionsbundle:

in config/packages/stof_doctrine_extensions.yaml

stof_doctrine_extensions:
    orm:
        your_orm:
            timestampable: true

Usage

The bundle provides a simple data model to handle the programatical creation of pages and some routes and views to display those pages.

configuration:

To use the routes provided by the bundle, you will have to add the following line to config/routes.yaml:

kazetenn_pages:
  resource: "@KazetennPages/Resources/config/routes.yaml"

in config/packages/kazetenn-pages.yaml:

kazetenn_pages:
    blog_url: ""

by default there is no prefix in front the diplay route, however, using this config you can add one.

the data model

the budle articulates around 2 entities:

Page

which represent a page to display

in a page, you can define:

  • a title
  • a slug
  • a parent
  • a list of content

this will be used to handle the page display and url

if the page have no parent, her url will be:

/{blog_url}/{slug}

if the page have a parent, her url will be:

/{blog_url}/{parent_slug}/{slug}

PageContent

which handle the content of a page.

in a pageContent, you will can define:

  • a content
  • a template
  • a parent
  • an order
  • a align (vertical or horizontal)
  • a list of content

The content is a text/html. It will always be rendered using the raw twig function.

The template allows you to define a twig template to personalize the rendering of the content without storing html in the database.

A pageContent can reference multiple other pageContent (childs). Using the align property, you can define the way a content's childs will be rendered. Using this, you can easilly create a grid of content, allowing you to easily order you content. To ease this, a pageContent's content property can be null, allowing you to create an ordering pageContent.

Finally, the order property allow you to choose the rendering order of a pageContent between him and same level contents.

License

The pages bundle is under MIT liscence

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固