Skip to content

Instantly share code, notes, and snippets.

@MattCheely
Created July 31, 2012 21:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattCheely/3220568 to your computer and use it in GitHub Desktop.
Save MattCheely/3220568 to your computer and use it in GitHub Desktop.
Page layout templates using mustache inheritance.
{{! this is a specific (dummy) page with a menu in the 'portal' application}}
{{< portal/prototypes/menuPage.html}}
{{$pageId}}aboutMe{{/pageId}}
{{$pageTitle}}
{{#i18n}}aboutMe.title{{/i18n}}
{{/pageTitle}}
{{$pageContent}}
{{#i18n}}aboutMe.title{{/i18n}}
{{/pageContent}}
{{/ portal/prototypes/menuPage.html}}
{{! this is the parent template for pages that contain a navigation menu in the 'portal' application}}
{{< shared/prototypes/menuPage.html}}
{{$headAssets}}
{{> portal/includes/headAssets.html}}
{{/headAssets}}
{{$chromeHeader}}
{{> portal/includes/chrome/header.html}}
{{/chromeHeader}}
{{$mainMenu}}
{{> portal/includes/main-menu.html}}
{{/mainMenu}}
{{$bodyAssets}}
{{> portal/includes/bodyAssets.html}}
{{/bodyAssets}}
{{/ shared/prototypes/menuPage.html}}
{{! this is the parent template for pages that contain a navigation menu across apps}}
{{< shared/prototypes/page.html}}
{{$pageBody}}
<div id="mainMenu">
{{$mainMenu}}{{/mainMenu}}
</div>
<div id="pageContent" class="clearfix">
{{$pageContent}}{{/pageContent}}
</div>
{{/pageBody}}
{{/ shared/prototypes/page.html}}
{{! this is the base template for (almost) all pages across multiple applications}}
<!DOCTYPE html>
<html id="{{$pageId}}{{/pageId}}" class="{{displayLocale.language}}-{{displayLocale.country}} {{$pageClass}}{{/pageClass}}">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>{{$pageTitle}}{{#i18n}}default.title{{/i18n}}{{/pageTitle}}</title>
{{$headAssets}}{{/headAssets}}
</head>
<body>
{{$chromeHeader}}
{{> /shared/prototypes/chrome/header.html}}
{{/chromeHeader}}
<div id="pageBody" class="clearfix">
{{$pageBody}}{{/pageBody}}
</div> <!-- #pageBody -->
{{> /shared/includes/chrome/footer.html}}
{{$bodyAssets}}{{/bodyAssets}}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment