You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2017/06/27 13:53:44 UTC
sling-site git commit: Fix NPE if missing content or title
Repository: sling-site
Updated Branches:
refs/heads/master 7d36f88d6 -> 6ea09f635
Fix NPE if missing content or title
Project: http://git-wip-us.apache.org/repos/asf/sling-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/sling-site/commit/6ea09f63
Tree: http://git-wip-us.apache.org/repos/asf/sling-site/tree/6ea09f63
Diff: http://git-wip-us.apache.org/repos/asf/sling-site/diff/6ea09f63
Branch: refs/heads/master
Commit: 6ea09f6350f64020016ea3a859d06b7e99c46b9d
Parents: 7d36f88
Author: Bertrand Delacretaz <bd...@apache.org>
Authored: Tue Jun 27 15:53:31 2017 +0200
Committer: Bertrand Delacretaz <bd...@apache.org>
Committed: Tue Jun 27 15:53:31 2017 +0200
----------------------------------------------------------------------
templates/layout/main.tpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sling-site/blob/6ea09f63/templates/layout/main.tpl
----------------------------------------------------------------------
diff --git a/templates/layout/main.tpl b/templates/layout/main.tpl
index 15df161..3fbfc52 100644
--- a/templates/layout/main.tpl
+++ b/templates/layout/main.tpl
@@ -9,7 +9,7 @@ html(lang:'en'){
div(class:"main") {
h1 {
- yield content.title
+ yield "${ content ? content.title : "<MISSING CONTENT OBJECT??>" }"
}
bodyContents()