Download the PHP package roadiz/abstract-blog-theme without Composer

On this page you can find all versions of the php package roadiz/abstract-blog-theme. 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 abstract-blog-theme

Abstract Blog Theme

Abstract Blog middleware for your Roadiz theme.

Inheritance

Your own theme entry class must extend AbstractBlogThemeApp instead of FrontendController to provide essential methods:

Dependency injection

Edit your own app/AppKernel.php to register Blog services:

You must override these services in your custom theme:

with your own node-type class names.

Add node-types

Abstract Blog theme declare 3 node-types to create your blog website:

PostContainerControllerTrait

PostContainerControllerTrait will implement your indexAction by handling all request data to provide your posts, filters and available tags to build your template.

IndexAction will assign:

Filtering

You can filter your post-container entities using Request attributes or query params :

Usage

All you need to do is creating your PostContainer node-source's Controller in your theme and implements ConfigurableController and use PostContainerControllerTrait. You will be able to override any methods to configure your blog listing.

Multiple container controllers usage

If you have more than one blog-post type (Blogpost and PressReview for example), we advise strongly to create an Abstract class in your theme using this Trait before using it, it will ease up method overriding if you have multiple container controllers classes:

Then, simply inherit from your Abstract in your multiple container controller definitions:

Override PostContainerControllerTrait behaviour

Those methods can be overridden to customize your PostContainerControllerTrait behaviour.

You can override other methods, just get a look at the PostContainerControllerTrait file…

PostControllerTrait

PostControllerTrait will implement your indexAction by handling all request data to provide a single post with its multiple formats.

Usage

All you need to do is creating your Post node-source'Controller in your theme and implements ConfigurableController and use PostControllerTrait.

Override PostControllerTrait behaviour

Those methods can be overridden to customize your PostControllerTrait behaviour.

Search engine with Solr

Add your search form in your website templates (use GET method to enable user history):

Then create pages/search.html.twig template.

Override PostControllerTrait behaviour

Search result model

For JSON search responses, SearchControllerTrait uses JMS Serializer with a custom model to decorate your node-sources and its highlighted text. By default SearchControllerTrait instantiates a Themes\AbstractBlogTheme\Model\SearchResult object that will be serialized. You can override this model if you want to add custom fields according to your node-sources data.

Create a child class, then override createSearchResultModel method:

You’ll be able to add new virtual properties in your child SearchResult model.

AMP mobile page support

AMP format is supported for blog-post detail pages.

RSS feed support

RSS format is supported for blog-post containers listing pages.

Templates

Resources/views/ folder contains useful templates for creating your own blog. Feel free to include them directly in your theme or duplicated them.

By default, your Roadiz website will directly use AbstractBlogTheme templates. You can override them in your inheriting Theme using the exact same path and name.

Twig extension

Functions

Filters


All versions of abstract-blog-theme with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
roadiz/roadiz Version ~1.7.22
rezozero/social-links Version ^1.5 || ^2.0
twig/twig Version ^3.0
jms/serializer Version ^2.3.0 || ^3.1.1
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 roadiz/abstract-blog-theme contains the following files

Loading the files please wait ....