summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2018-11-25 13:29:31 -0800
committerSteve Piercy <web@stevepiercy.com>2018-11-25 13:29:31 -0800
commitf5355df850ff5abb2e184f74f3acc1bd193d5d72 (patch)
treedd139dd1dd0faf426b33d611176c8ecb7bd2e23e /docs
parent9495e5d7e65b138b0b209635efd00ae02c2afd27 (diff)
downloadpyramid-f5355df850ff5abb2e184f74f3acc1bd193d5d72.tar.gz
pyramid-f5355df850ff5abb2e184f74f3acc1bd193d5d72.tar.bz2
pyramid-f5355df850ff5abb2e184f74f3acc1bd193d5d72.zip
Fix template to include either the page name or a title for the title tag
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorials/wiki/definingviews.rst2
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/templates/layout.pt2
-rw-r--r--docs/tutorials/wiki/src/authorization/tutorial/views/default.py1
-rw-r--r--docs/tutorials/wiki/src/views/tutorial/templates/layout.pt2
4 files changed, 4 insertions, 3 deletions
diff --git a/docs/tutorials/wiki/definingviews.rst b/docs/tutorials/wiki/definingviews.rst
index 81ef4f5c4..bd8dc6ecf 100644
--- a/docs/tutorials/wiki/definingviews.rst
+++ b/docs/tutorials/wiki/definingviews.rst
@@ -290,7 +290,7 @@ We can do this via :term:`METAL` macros and slots.
- The cookiecutter defined a macro named ``layout`` (line 1).
This macro consists of the entire template.
-- We changed the ``title`` tag to use the ``name`` attribute of a ``page`` object (lines 11-12).
+- We changed the ``title`` tag to use the ``name`` attribute of a ``page`` object, or if it does not exist then the page title (lines 11-12).
- The cookiecutter defined a macro customization point or `slot` (line 36).
This slot is inside the macro ``layout``.
Therefore it can be replaced by content, customizing the macro.
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/templates/layout.pt b/docs/tutorials/wiki/src/authorization/tutorial/templates/layout.pt
index ba40fd6f4..b606e8dad 100644
--- a/docs/tutorials/wiki/src/authorization/tutorial/templates/layout.pt
+++ b/docs/tutorials/wiki/src/authorization/tutorial/templates/layout.pt
@@ -8,7 +8,7 @@
<meta name="author" content="Pylons Project">
<link rel="shortcut icon" href="${request.static_url('tutorial:static/pyramid-16x16.png')}">
- <title>${page.__name__} - Pyramid tutorial wiki (based on
+ <title><span tal:replace="page.__name__ | title"></span> - Pyramid tutorial wiki (based on
TurboGears 20-Minute Wiki)</title>
<!-- Bootstrap core CSS -->
diff --git a/docs/tutorials/wiki/src/authorization/tutorial/views/default.py b/docs/tutorials/wiki/src/authorization/tutorial/views/default.py
index a44aca786..0725f7660 100644
--- a/docs/tutorials/wiki/src/authorization/tutorial/views/default.py
+++ b/docs/tutorials/wiki/src/authorization/tutorial/views/default.py
@@ -106,6 +106,7 @@ def login(request):
came_from=came_from,
login=login,
password=password,
+ title='Login',
)
diff --git a/docs/tutorials/wiki/src/views/tutorial/templates/layout.pt b/docs/tutorials/wiki/src/views/tutorial/templates/layout.pt
index ba40fd6f4..b606e8dad 100644
--- a/docs/tutorials/wiki/src/views/tutorial/templates/layout.pt
+++ b/docs/tutorials/wiki/src/views/tutorial/templates/layout.pt
@@ -8,7 +8,7 @@
<meta name="author" content="Pylons Project">
<link rel="shortcut icon" href="${request.static_url('tutorial:static/pyramid-16x16.png')}">
- <title>${page.__name__} - Pyramid tutorial wiki (based on
+ <title><span tal:replace="page.__name__ | title"></span> - Pyramid tutorial wiki (based on
TurboGears 20-Minute Wiki)</title>
<!-- Bootstrap core CSS -->