Skip to content

Commit

Permalink
Extended twig
Browse files Browse the repository at this point in the history
Created an Index file and use the extends and block examples for twig
  • Loading branch information
kinncj committed Sep 2, 2012
1 parent f0b8919 commit 847686e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
9 changes: 9 additions & 0 deletions views/index.twig
@@ -0,0 +1,9 @@
<html>
<head>Title</head>
<script src="http://code.jquery.com/jquery-1.8.1.min.js" type="text/javascript"></script>
<body>
{% block content %}
<h1> Welcome to Silex-Sample </h1>
{% endblock %}
</body>
</html>
5 changes: 4 additions & 1 deletion views/message.twig
@@ -1,2 +1,5 @@
{% extends 'index.twig' %}
{% block content %}
{{ message|e }}
<a href="/">Back</a>
<a href="/">Back</a>
{% endblock %}
5 changes: 4 additions & 1 deletion views/user.twig
@@ -1,3 +1,5 @@
{% extends 'index.twig' %}
{% block content %}
<h2>Users</h2>
<table>
<tr>
Expand All @@ -24,4 +26,5 @@
<label>E-mail</label>
<input type="text" name="email">
<input type="submit" value="Create">
</form>
</form>
{% endblock %}

0 comments on commit 847686e

Please sign in to comment.