Download the PHP package rinart73/document-helper without Composer
On this page you can find all versions of the php package rinart73/document-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rinart73/document-helper
More information about rinart73/document-helper
Files in rinart73/document-helper
Package document-helper
Short Description CodeIgniter 4 library for that allows for easier HTML generation, particularly when it comes to head tags, scripts, styles and images
License MIT
Homepage https://github.com/rinart73/document-helper
Informations about the package document-helper
Document Helper
Document Helper is a CodeIgniter 4 library for easier HTML generation, particularly when it comes to meta-tags, styles, scripts and images.
It's heavilly inspired by OpenCart and Wordpress.
Features
- Add document
title
,meta
,link
tags in Controllers;html
andbody
classes in Controllers and Views. - Register scripts and styles that you might need. When you request them, their dependencies are added and sorted automatically.
- Generate image variants (resized versions for
srcset
, alternative image types such as WebP) and renderimg
/picture
at the same time.
Getting Started
Prerequisites
- A CodeIgniter 4.2.7+ based project
- Composer for package management
- PHP 7.4+
Installation
Installation is done through Composer.
Suggested setup
Add the document
helper and the Rinart73\DocumentHelper\Document
class into your Controllers/BaseController.php
:
Then add helper functions into your layouts:
Views/layouts/layout-default.php
Then you will be able to use the features that the library prodives in your Controllers and Views:
Controllers/Articles.php
Overview
Refer to examples for more showcases.
Document tags
Scripts and styles
Images
Helpers
Helper functions are typically meant to be used inside views, although they can be used anywhere else.
Controllers/YourController.php
Views/layout-default.php
Views/view-auth.php
License
This project is licensed under the MIT License - see the LICENSE file for details.