Search by

drago-ex / project-static-page

accgit

Static page administration for Drago Project.

Package info

github.com/drago-ex/project-static-page

Type:drago-tools-resource

pkg:composer/drago-ex/project-static-page

Statistics

Installs: 110

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v2.0.0 2026-10-31 15:42 UTC

This package is auto-updated.

Last update: 2026-11-05 19:06:33 UTC


README

Static pages for Drago Project: pages such as "About us" with their own address and an optional item in the website menu, written in the administration.

PHP version Coding Style

Requirements

Installation

composer require drago-ex/project-static-page

Project Tools copies the files of the package into the project, where you adapt them.

Database

The migration creates the table static_page; run it with bin/project-setup of Drago Project or php vendor/bin/migration db:migrate --packages.

Assets

The package has no scripts of its own. It uses:

Administration

{link :Backend:Page:}

The menu item comes from Backend/Page/5.menu.neon with Backend UI. Pages are created, edited, deleted, filtered and sorted in a datagrid. A page has a title, content, slug, meta description, status (draft or published) and "Show in the menu" with its position. A slug whose address already belongs to another page of the site (admin, sign, en…) is refused.

Website

A published page is shown at the top level of the site, e.g. /o-nas (and /en/o-nas). The route is added by Front/Page/8.conf.neon before the front router and matches only slugs of published pages.

{link :Front:Page: slug: 'o-nas'}

Content is written in Texy and printed safely: raw HTML is limited to safe tags and links, headings start at <h2> and code blocks with a language are highlighted. The description is the <meta name="description"> of the page.

Pages with "Show in the menu" are returned by App\Model\Page\PageMenu::getItems() (slug => title, cached, cleaned when a page is saved or deleted). Print them in your layout (Front UI does it in its navbar):

$this->template->menuPages = $this->pageMenu->getItems();
<a n:foreach="$menuPages as $slug => $title" n:href=":Front:Page:default, slug: $slug">{$title}</a>

Permissions

The rules are in Backend/Page/acl.neon (resource Backend:Page, the administrator only) and Front/Page/acl.neon (resource Front:Page, everyone). The privileges of Backend:Page are default, edit and delete; buttons are shown only to those who may use them. Project Permission gives them to other roles.

The same files describe the privileges (permissionLabels) for the permissions page of Project Permission.