承接 anomaly/pages-module 相关项目开发

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

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

anomaly/pages-module

最新稳定版本:v2.7.1

Composer 安装命令:

composer require anomaly/pages-module

包简介

Create pages, generate navigation, manage content, and build websites faster than ever.

README 文档

README

anomaly.module.pages

Create pages, generate navigation, manage content, and build websites faster than ever.

The Pages Module is PyroCMS's flagship content management system for building dynamic websites with powerful page types and layouts.

Features

  • Page type system
  • Layout management
  • Nested page structure
  • Route handling
  • SEO optimization
  • Multiple page types
  • Template variables
  • Page drafts & versioning

Usage

Creating Page Types

Navigate to Pages > Types in the control panel to create page types with custom fields and layouts.

Accessing Pages

use Anomaly\PagesModule\Page\Contract\PageRepositoryInterface;

$pages = app(PageRepositoryInterface::class);

// Get page by path
$page = $pages->findByPath('/about');

// Get home page
$home = $pages->findHome();

// Get child pages
$children = $pages->findChildren($page);

In Twig

{# Current page #}
{{ page.title }}
{{ page.meta_title }}
{{ page.content|raw }}

{# Navigation #}
{% for child in page.children %}
    <a href="{{ child.path }}">{{ child.title }}</a>
{% endfor %}

{# Build menu from pages #}
{% for item in pages().root().get() %}
    <a href="{{ item.path }}">{{ item.title }}</a>
{% endfor %}

Page Variables

{# Access page type fields #}
{{ page.content }}
{{ page.hero_image.path }}
{{ page.gallery.images }}

{# Meta information #}
<title>{{ page.meta_title }}</title>
<meta name="description" content="{{ page.meta_description }}">

Requirements

  • Streams Platform ^1.10
  • PyroCMS 3.10+
  • Preferences Module ^2.3+

License

The Pages Module is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 46.64k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 22
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-07