Closed
Bug 579928
Opened 14 years ago
Closed 12 years ago
Implement template system with inheritance
Categories
(www.mozilla.org :: General, enhancement)
www.mozilla.org
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: abuchanan, Assigned: abuchanan)
Details
(Whiteboard: [betterness])
http://www.twig-project.org/ I'll implement some code to allow Twig templates to be used along side our current PHP templates.
Assignee | ||
Comment 1•14 years ago
|
||
Ok, added Twig library and changed prefetch to allow both Twig and PHP templates to coexist. In order to do this, we need to follow this convention: each Twig template must have this line at the top {# <?php $is_twig = true; ?> #} This is what allows prefetch to know what is a Twig template, and what is PHP. When we're not using PHP templates anymore, we can stop this convention. Here's an example, https://www-trunk.stage.mozilla.com/en-US/twig.html I'll work on adding a base template and some useful extensions to Twig, so we can do things like, {% download_button %} {{ url('firefox/all') }} {{ img('firefox/whatever.png') }} {{ style('tignish/foo.css') }} etc
Assignee | ||
Comment 2•14 years ago
|
||
After pondering this for a long time, Twig might not be the best option, because it's such a big syntax change. http://phpti.com/ ^ has most of the same features, most importantly inheritance, and uses the same PHP syntax we're already using. Could be a better option. I'm going to remove any Twig code I implemented.
Severity: normal → enhancement
Summary: Implement Twig → Implement template system with inheritance
Whiteboard: [betterness]
Updated•12 years ago
|
Component: www.mozilla.org/firefox → www.mozilla.org
Updated•12 years ago
|
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
Comment 3•12 years ago
|
||
we have that with jinja/bedrock now
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•