Browse Source

fixed text_extends

Roberto Saccon 17 years ago
parent
commit
93a7d7446a

+ 11 - 0
demo/out/test_extends.html

@@ -0,0 +1,11 @@
+base-barstring
+
+base template
+
+replacing the base title
+
+more of base template
+
+replacing the base content - variable: test-barstring after variable 
+
+end of base template

+ 1 - 1
demo/templates/base.html

@@ -1,4 +1,4 @@
-{{ variable }}
+{{ base_var }}
 
 
 base template
 base template
 
 

+ 1 - 1
demo/templates/test_extends.html

@@ -1,3 +1,3 @@
 {% extends "base.html" %}
 {% extends "base.html" %}
 {% block title %}replacing the base title{% endblock %}
 {% block title %}replacing the base title{% endblock %}
-{% block content %}replacing the base content - variable: {{ another_variable }} after variable {% endblock %}
+{% block content %}replacing the base content - variable: {{ test_var }} after variable {% endblock %}

+ 1 - 1
src/demo/erlydtl_demo.erl

@@ -102,7 +102,7 @@ render("var" = Name) ->
     render(Name, ".html", [{var1, "foostring1"}, {var2, "foostring2"}]);
     render(Name, ".html", [{var1, "foostring1"}, {var2, "foostring2"}]);
  
  
 render("extends" = Name) ->
 render("extends" = Name) ->
-    render(Name, ".html", [{var1, "barstring1"}, {var2, "barstring2"}]);
+    render(Name, ".html", [{base_var, "base-barstring"}, {test_var, "test-barstring"}]);
         
         
 render("comment" = Name) ->
 render("comment" = Name) ->
     render(Name, ".html");
     render(Name, ".html");