-
-
Save copleykj/42ce83604a15c83b2d7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template.gem_view.context = function() { | |
return { | |
contentTemplate: "gems" | |
}; | |
}; | |
Template.page.render_content = function() { | |
var context = this; | |
var html = Template.no_template_found; | |
if (context && context.contentTemplate) { | |
if (typeof Template[context.contentTemplate] !== "undefined") { | |
html = Template[context.contentTemplate]; | |
} | |
} | |
return html; | |
} | |
/* here is the template for the code above */ | |
<template name="page"> | |
{{{render_content context}}} | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment