System for setting up and rendering theme template files. Views are a bit like a suped-up version of the core WordPress get_template_part() function.

v1.0.0 2023-06-11 17:41 UTC

This package is auto-updated.

Last update: 2025-02-16 22:00:57 UTC


README

The Backdrop Template View is a drop-in package for Backdrop framework for developing ClassicPress and WordPress theme. This feature is used for setting up and rendering theme template files and it is similar to the WordPress core feature get_template_part function. However it allows you to build a hierarchy of potential templates.

Requirements

Installation

Use the following command from your preferred command line utility to install Backdrop Template View

composer require backdrop-dev/view

Registering and Booting

To begin, create a new provider as follows.

$slug->provider( Backdrop\View\Provider::class );

After you have successfully registering and booting the provider, all you have to do is use the following to begin using the view

Backdrop\View\display( 'something', 'one', [ 'location' => 'data' ] );

This will create a new template call something.php. you can pass an array as well something, [ 'one, two ]. The order would be

something-two.php
something-one.php
something.php

Please also note that all templates will be located at public/views or resource/views depending on the project.

Copyright and Licenses

This project is licensed under the GNU GPL, version 2 or later.

2019–2023 © Benjamin Lu