dreerr Posted November 6, 2015 Posted November 6, 2015 TemplateEnginePug (formally TemplateEngineJade) This module adds Pug templates to the TemplateEngineFactory. It uses https://github.com/pug-php/pug to render templates. doctype html html(lang='en') head meta(http-equiv='content-type', content='text/html; charset=utf-8') title= $page->title link(rel='stylesheet', type='text/css', href=$config->urls->templates . 'styles/main.css') body include header.pug h1= $page->title if $page->editable() p: a(href=$page->editURL) Edit Project on GitHub: github.com/dreerr/TemplateEnginePug Project in modules directory: modules.processwire.com/modules/template-engine-pug/ For common problems/features/questions about the Factory, use the TemplateEngineFactory thread. 8
Mike Rockett Posted November 6, 2015 Posted November 6, 2015 Excellent stuff! Shall be giving this a shot soon. Thanks for the module! (Heads-up: the GH link takes me to wanze's TemplateEngineTwig...) 1
dreerr Posted November 7, 2015 Author Posted November 7, 2015 Thanks! Looking forward working with it myself!
dreerr Posted February 11, 2016 Author Posted February 11, 2016 Changed the git so that jade-php is included in a normal download. Version 1.0.2 brings also some additional settings for stream and a problem we experienced with Suhosin 2
netopolit Posted June 28, 2016 Posted June 28, 2016 @dreerr Thank you for this module. Wanted to use jade with PW for a long time. Is there a way to define global variables that can be used in any template or in a jade layout file? Thanks 1
dreerr Posted September 30, 2016 Author Posted September 30, 2016 Sorry for the late reply: you cn do so by using the Factorys method: $view->set('globalVar', $someVariable);
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now