Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
harrydeluxe committed May 14, 2012
1 parent e388ba1 commit db1c555
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Allow Templatenames with Fileextension
* Extends Tag supports now multiple inheritance
* Clean up code, change all variables and methods to camelCase

Expand Down
9 changes: 4 additions & 5 deletions example/block.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
define('LIQUID_INCLUDE_SUFFIX', 'tpl');
define('LIQUID_INCLUDE_PREFIX', '');

define('LIQUID_INCLUDE_ALLOW_EXT', true);

require_once('../Liquid.class.php');

Expand All @@ -23,6 +23,5 @@
'copyright' => '&copy; Copyright 2012 Harald Hanek - All rights reserved.'
)
);

print $liquid->render($assigns);
?>

echo $liquid->render($assigns);
2 changes: 1 addition & 1 deletion example/protected/templates/base.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE HTML>
<html>
<head>
{% include 'header' %}
{% include 'header.tpl' %}
</head>
<body>
<div id="content">{% block content %}{% endblock %}</div>
Expand Down
6 changes: 6 additions & 0 deletions example/protected/templates/blocks/child.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% comment %} This is the child template. {% endcomment %}
{% extends "base.tpl" %}

{% block footer %}
{{ document.copyright }}
{% endblock %}
6 changes: 1 addition & 5 deletions example/protected/templates/child.tpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{% comment %} This is the child template. {% endcomment %}
{% extends "base" %}
{% extends "blocks/child.tpl" %}

{% block content %}
<h2>Entry one</h2>
<p>This is my first entry.</p>
{% endblock %}

{% block footer %}
{{ document.copyright }}
{% endblock %}

0 comments on commit db1c555

Please sign in to comment.