diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2005-07-16 17:13:20 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2005-07-16 17:13:20 +0000 |
| commit | 058c526ef9995fa54d64f5e6362c9f93a935fbb0 (patch) | |
| tree | ab73b14dc9b102ef2e7a8f81ecbcbeb3e26cd693 /docs/templates.txt | |
| parent | fca1ef1d15650d6c2d5b9a35597f057004729ea4 (diff) | |
Rolled comments from template page into FAQ
git-svn-id: http://code.djangoproject.com/svn/django/trunk@112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/templates.txt')
| -rw-r--r-- | docs/templates.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/templates.txt b/docs/templates.txt index ddf40bac83..b07883cbe8 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -97,7 +97,9 @@ your site and defines **blocks** that child templates can override. It's easiest to understand template inheritance by starting with an example:: - <html> + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <link rel="stylesheet" href="style.css" /> <title>{% block title %}My Amazing Site{% endblock %}</title> @@ -150,7 +152,9 @@ At that point, the template engine will notice the three blocks in ``base.html``, and replace those blocks with the contents of the child template. Depending on the value of ``blog_entries``, the output might look like:: - <html> + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <link rel="stylesheet" href="style.css" /> <title>My Amazing Blog</title> @@ -173,6 +177,8 @@ Depending on the value of ``blog_entries``, the output might look like:: </div> </body> + + Note that since the child template did not define the ``sidebar`` block, the value from the parent template is used instead. |
