charcoal / cms
Charcoal CMS (Content Management System) Module
Requires
- php: ^7.4 || ^8.0
- charcoal/app: ^5.0
- charcoal/attachment: ^5.0
- charcoal/core: ^5.0
- charcoal/factory: ^5.0
- charcoal/object: ^5.0
- charcoal/property: ^5.0
- charcoal/translator: ^5.0
- psr/http-message: ^1.0
Requires (Dev)
- charcoal/admin: ^5.0
- mustache/mustache: ^2.11
- php-coveralls/php-coveralls: ^2.2
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.5
- tedivm/stash: ~0.16
Conflicts
- charcoal/admin: <0.28.0
Replaces
- dev-main / 5.x-dev
- v5.0.0
- v4.1.0
- v4.0.8
- v4.0.7
- v4.0.6
- v4.0.5
- v4.0.4
- v4.0.2
- v4.0.1
- v4.0.0
- v3.1.8
- v3.1.7
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v2.2.3
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.2
- 0.10.0
- 0.9.7
- 0.9.6
- 0.9.5
- 0.9.4
- 0.9.3
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.6.4
- 0.8.6.3
- 0.8.6.2
- 0.8.6.1
- 0.8.6
- 0.8.5
- 0.8.4.1
- 0.8.4
- 0.8.3.1
- 0.8.3
- 0.8.2.1
- 0.8.2
- 0.8.1
- 0.8.0.3
- 0.8.0.2
- 0.8.0.1
- 0.8.0
- 0.7.0.1
- 0.7.0
- 0.6.0
- 0.5.2
- 0.5.1.1
- 0.5.1
- 0.5.0
- 0.4.6.1
- 0.4.6
- 0.4.5.1
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1.2
- 0.4.1.1
- 0.4.1
- 0.4.0.2
- 0.4.0.1
- 0.4
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5.1
- 0.3.5
- 0.3.4
- 0.3.3.2
- 0.3.3.1
- 0.3.3
- 0.3.2.4
- 0.3.2.3
- 0.3.2.2
- 0.3.2.1
- 0.3.2
- 0.3.1
- 0.3
- 0.2.1
- 0.2
- 0.1
- dev-feature/camelizePropertiesAndUseArrayAccess
- dev-mcaskill-patch-web-template
- dev-losted-patch-unit-tests
- dev-mducharme-admin-metadata
- dev-dlord-relation
This package is auto-updated.
Last update: 2024-11-13 16:27:36 UTC
README
The CMS package provides common objects and tools for building user-facing Web sites.
Installation
composer require charcoal/cms
For Charcoal projects, the service provider can be registered from your configuration file:
{ "service_providers": { "charcoal/cms/service-provider/cms": {} } }
Usage
Objects
Section object
A section, in Charcoal, is a reachable page on the website, as part of the full hierarchical site map. They can be displayed in menus or breadcrumbs and be reached with a unique URL (routable
).
Types of sections:
blocks
- Blocks sections define their content as a structured map of blocks.
content
- Content sections define their content in a single, simple HTML property.
empty
- Empty sections are linked to a template but do not require any custom content.
external
- External sections are simply a redirect to an external (or internal) URL.
All section types, except external, make use of a Template
object to be rendered. Typically, a charcoal view
make sure of linking the template
(by default, mustache
Sections are standard Charcoal
Model
, meaning they are describable with aMetadata
object (which define a map ofproperties
) and storable with aSource
object.
Base section properties:
Interfaces
From model:
Describable
: The objects can be defined by Metadata.Storable
: Objects have unique IDs and can be stored in storage / database.
From content:
Content
: A "managed" charcoal model (describable with metadata / storable).Authorable
: Creation and modification user (admin) are kept in the storage.Revisionable
: Copy of changes will be kept upon each object update in the storage.Timestampable
: Creation and modification time are kept into the storage.
From charcoal/object:
Hierarchicale
: The objects can be stacked hierarchically.Publishable
: Objects have publish status, date and expiry. Allows moderation.Routable
: Objects are reachable through a URL.
From charcoal/cms:
Metatag
: The objects have meta-information for SEO purpose.Searchable
: Extra keywords can be used to help search engine.Templateable
: The objects can be rendered with a template / controller / config combo.
Extending the section object
The \Charcoal\Cms\Section\*
objects are final
. To extend, use the \Charcoal\Cms\AbstractSection
base object instead, to make sure no metadata conflicts arise.
Tag object
Tag objects link any objects together by providing an extra taxonomy layer. Tags may also be used to enhance internal search engines.
Event object
Charcoal Event is a specialized content object to describe an event, which typically happens at a given date in a certain location.
Base events properties:
Interfaces
From model:
Describable
: The objects can be defined by Metadata.Storable
: Objects have unique IDs and can be stored in storage / database.
From content:
Content
: A "managed" charcoal model (describable with metadata / storable).Authorable
: Creation and modification user (admin) are kept in the storage.Revisionable
: Copy of changes will be kept upon each object update in the storage.Timestampable
: Creation and modification time are kept into the storage.
From charcoal/object:
Categorizable
: The objects can be put into a category.Publishable
: Objects have publish status, date and expiry. Allows moderation.Routable
: Objects are reachable through a URL.
From charcoal/cms:
Metatag
: The objects have meta-information for SEO purpose.Searchable
: Extra keywords can be used to help search engine.Templateable
: The objects can be rendered with a template / controller / config combo.
Extending the event object
The \Charcoal\Cms\Event
object is final
. To extend, use the \Charcoal\Cms\AbstractEvent
base object instead, to make sure no metadata conflicts arise.
Event categories
Event category objects are simple charcoal/object/category
used to group / categorize events. The default type is Charcoal\Cms\EventCategory
.
Events implement the Categorizable
interface, from charcoal/object.
FAQ object
FAQ objects are a special content type that is split in a "question" / "answer" format.
FAQ categories
FAQ category objects are simple charcoal/object/category
used to group / categorize FAQ objects. The default type is Charcoal\Cms\FaqCategory
.
FAQs implement the Categorizable
interface, from charcoal/object.
News object
News object are a special content type that with a specific news date.
Base news properties:
Interfaces
From model:
Describable
: The objects can be defined by Metadata.Storable
: Objects have unique IDs and can be stored in storage / database.
From content:
Content
: A "managed" charcoal model (describable with metadata / storable).Authorable
: Creation and modification user (admin) are kept in the storage.Revisionable
: Copy of changes will be kept upon each object update in the storage.Timestampable
: Creation and modification time are kept into the storage.
From charcoal/object:
Categorizable
: The objects can be put into a category.Publishable
: Objects have publish status, date and expiry. Allows moderation.Routable
: Objects are reachable through a URL.
From charcoal/cms:
Metatag
: The objects have meta-information for SEO purpose.Searchable
: Extra keywords can be used to help search engine.Templateable
: The objects can be rendered with a template / controller / config combo.
Extending the news object
The \Charcoal\Cms\News
object is final
. To extend, use the \Charcoal\Cms\AbstractNews
base object instead, to make sure no metadata conflicts arise.
News categories
News category objects are simple charcoal/object/category
used to group / categorize events. The default type is Charcoal\Cms\NewsCategory
.
News implement the Categorizable
interface, from charcoal/object.