Download the PHP package manuxi/sulu-article-configuration-bundle without Composer

On this page you can find all versions of the php package manuxi/sulu-article-configuration-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sulu-article-configuration-bundle

SuluArticleConfigurationBundle

php workflow symfony workflow License: MIT GitHub Tag Supports Sulu 3.0 or later

๐Ÿ‡ฉ๐Ÿ‡ช German Version

The SuluArticleConfigurationBundle extends Sulu 3.0 Articles with a comprehensive "Configuration" tab. It allows managing additional display options, features, and publication settings directly on the article.

โœจ Features

๐Ÿ“‹ Display Options

โš™๏ธ Functions & Features

๐Ÿš€ Publication Settings

๐ŸŽจ Styling & Advanced

๐Ÿงฉ Configurable Fields

๐Ÿ”„ Default-Configuration

๐Ÿ“‹ Prerequisites

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿญ Installation

Step 1: Install the package

Add the repository to your composer.json (if local) or install directly:

If you are not using Symfony Flex, add the bundle to config/bundles.php:

Step 2: Configure routes

Add the following to config/routes.yaml to load the Admin API routes:

Step 3: Update the database

Create the required ar_article_configuration table:

๐ŸŽฃ Usage

Admin Interface

  1. Navigate to Articles in the Sulu admin navigation.
  2. Open an existing article or create a new one.
  3. Click on the Configuration tab.
  4. Select the desired options (e.g., "Enable Sidebar", "Layout Style").
  5. Save the config.

Template Defaults

You can set a configuration as default for all articles with the same template:

  1. Open an article with the desired template (e.g., "Blog Post").
  2. Go to the Configuration tab.
  3. Configure all settings as desired.
  4. Enable "Use as default" in the "Default Configuration" section.
  5. Save the config.

Now all other articles with this template will automatically use these settings - unless they have their own configuration.

How the cascade works:

Custom Fields

The fields of the "Configuration" tab are defined with Sulu form XML. The bundle ships the fields listed below; your project can change them or add its own - for all articles, per article group or per template. Drop the files into config/article_configuration/ (registered automatically):

The files only contain the differences to the level before. A new <property> adds a field, a property with the same name replaces it, and <tag name="article_configuration.remove"/> removes it:

Values are stored as JSON, so a new field never needs a schema update. See docs/configuration.en.md for the levels, value types, translations and a complete example.

Frontend Usage (Twig)

The bundle provides a Twig function to access the resolved configuration in your twig templates:

Available configuration values (the fields shipped with the bundle; your schema may add or remove fields, and hardcoded means the schema defaults):

Property Type Default Description
layoutStyle string 'fullwidth' default, wide, fullwidth, narrow
enableSidebar bool true Show sidebar
sidebarPosition string 'right' left, right
showToc bool true Show table of contents
showReadingTime bool true Show reading time
showAuthorBox bool true Show author box
showRelated bool true Show related articles
enableShareButtons bool true Show share buttons
enablePrint bool true Show print button
hidePublishDate bool false Hide publish date
customCssClass string null Custom CSS class
configSource string - article, template_default, hardcoded

Example: Conditional sidebar layout

Example: Custom CSS class

Resolving an Article's Template by URL

article_configuration/article_config need the article's own templateKey, which is trivial to pass when you are already rendering that article's own page. It is not reachable through Sulu's properties mapping on a smart_content/selection list, though (the field lives in the resource's internal "view" data, which recursivelyMapProperties() never maps) -- for example an "articles" collection field on a page or a different article, where each item is only a title/subtitle/url/image, would always miss it.

article_template_key(url, locale) resolves it from the article's frontend URL instead (via the route table), so it works from exactly that situation. Returns null if the URL does not resolve to a live article.

Combine with your own template-to-color/label mapping (e.g. a project-level color palette) to badge articles by their template in a list -- the bundle only resolves the key, it has no opinion on colors or labels.

โฌ†๏ธ Upgrading from 2.x

3.0 stores the values as JSON instead of fixed columns. Make a database backup, then copy the data before the old columns are dropped:

Details and the list of breaking changes: CHANGELOG.md.

โฌ†๏ธ Upgrading from 1.x

2.0 removes the PDF switches (enableDownloadPdf, pdfShowCaptions, pdfShowAuthor, pdfShowModified, pdfShowOnlineLink, pdfCompanyData) from the "Configuration" tab. They now live in the excerpt tab of the article, provided by manuxi/sulu-pdf-bundle (1.3+) - per language and with the draft/publish workflow:

Replace articleConfig.enableDownloadPdf in your templates with sulu_pdf_available('articles', uuid, app.request.locale), run bin/adminconsole doctrine:schema:update --force to drop the columns and set the switches again in the excerpt tab.

๐Ÿ—„๏ธ Database Schema

The bundle creates the following table:

๐Ÿงช Testing

๐Ÿ“„ License

This bundle is under the MIT license. See the complete license in the bundle: LICENSE

๐Ÿ‘ค Author

Manuel Bertrams


All versions of sulu-article-configuration-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
doctrine/doctrine-bundle Version ^2.13
sulu/sulu Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package manuxi/sulu-article-configuration-bundle contains the following files

Loading the files please wait ...