All Projects → phproberto → joomla-twig

phproberto / joomla-twig

Licence: other
Twig 2.0 & Twig extensions integration for Joomla! https://phproberto.github.io/joomla-twig/

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
ruby
36898 projects - #4 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to joomla-twig

Twig Deferred Extension
An extension for Twig that allows to defer block rendering.
Stars: ✭ 97 (+288%)
Mutual labels:  twig, twig-extension
Slugify
Converts a string to a slug. Includes integrations for Symfony, Silex, Laravel, Zend Framework 2, Twig, Nette and Latte.
Stars: ✭ 2,697 (+10688%)
Mutual labels:  twig, twig-extension
Markdown Extension
[DEPRECATED] Markdown support for Twig
Stars: ✭ 105 (+320%)
Mutual labels:  twig, twig-extension
Html Compress Twig
Twig extension for compressing HTML and inline CSS/JS using WyriHaximus/HtmlCompress
Stars: ✭ 72 (+188%)
Mutual labels:  twig, twig-extension
DrupalTwigFood
Useful functions, filters for twig @ Drupal 8
Stars: ✭ 1 (-96%)
Mutual labels:  twig, twig-extension
String Extra
Unicode/String support for Twig
Stars: ✭ 92 (+268%)
Mutual labels:  twig, twig-extension
Reactrenderer
Client and Server-side React rendering from PHP
Stars: ✭ 201 (+704%)
Mutual labels:  twig, twig-extension
Fmbbcodebundle
🔠 BBCode bundle for Symfony projects
Stars: ✭ 56 (+124%)
Mutual labels:  twig, twig-extension
cache-extra
Template fragment cache support for Twig
Stars: ✭ 24 (-4%)
Mutual labels:  twig, twig-extension
cssinliner-extension
[DEPRECATED] CSS inliner support for Twig
Stars: ✭ 30 (+20%)
Mutual labels:  twig, twig-extension
Twig Cache Extension
Stars: ✭ 67 (+168%)
Mutual labels:  twig, twig-extension
twig-translation
A Twig Translation Extension
Stars: ✭ 15 (-40%)
Mutual labels:  twig, twig-extension
Awesome Twig
A curated list of amazingly awesome Twig extensions, snippets and tutorials
Stars: ✭ 63 (+152%)
Mutual labels:  twig, twig-extension
Cssinliner Extra
CSS Inliner support for Twig
Stars: ✭ 93 (+272%)
Mutual labels:  twig, twig-extension
Inky Extension
[DEPRECATED] Inky email template engine support for Twig
Stars: ✭ 57 (+128%)
Mutual labels:  twig, twig-extension
Twig Extensions
Twig extensions
Stars: ✭ 1,469 (+5776%)
Mutual labels:  twig, twig-extension
Twig Extra Bundle
The Twig bundle for official extra extensions
Stars: ✭ 389 (+1456%)
Mutual labels:  twig, twig-extension
Html Extra
HTML extension for Twig
Stars: ✭ 24 (-4%)
Mutual labels:  twig, twig-extension
breadcrumb-bundle
Symfony bundle for easy breadcrumbs management
Stars: ✭ 26 (+4%)
Mutual labels:  twig, twig-extension
markdown-extra
Markdown extension for Twig
Stars: ✭ 83 (+232%)
Mutual labels:  twig, twig-extension

Twig integration for Joomla!

Build Status

Twig 2.0 & Twig extensions integration for Joomla!

Index

Description

After integrating Twig with some projects I found the need to create some kind of standard package that can be used & extended by anbody at any project.

This Twig integration includes common global variables & functions required when using Twig in Joomla!

Some highlights:

  • Integrates Twig 2.0
  • Integrates official Twig extensions
  • Global variables to access active application, active document, session, active user, etc.
  • Functions to use JLayout, JProfiler, JRoute, JUri, JLanguage, JHtml, etc.
  • Integrated cache.
  • Integrated debug mode.
  • All the extensions are integrated through plugins so you can extend/replace any plugin you need.
  • 100% covered by unit tests.
  • SonarCloud is used for QA. Check the project in SonarCloud.

Example usage:

JLoader::import('twig.library');

// This will render a twig layout in: templates/{ACTIVE_TEMPLATE}/html/view.html.twig
echo Twig::render('@template/view.html.twig');  

You can find more examples/usages in the documentation;

Installation

  • Ensure that your site meets the requirements
  • Download latest version from the releases section
  • Install zip file in your site through Extension Manager

For a fast test you can now use the integrated examples.html.twig inside the library. Enable debug mode in your Joomla configuration and add this code to wherever you want to display examples (for example in your template index.php):

JLoader::import('twig.library');

echo Twig::render('@library/twig/examples.html.twig');

Documentation

See https://phproberto.github.io/joomla-twig/ for detailed documentation.

Requirements

  • PHP 7.0+ or higher
  • Joomla! 3.8.1 or higher

Copyright & License

This library is licensed under GNU LESSER GENERAL PUBLIC LICENSE.

Copyright (C) 2017 Roberto Segura López - All rights reserved.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].