Skip to content

Instantly share code, notes, and snippets.

@jaydenseric
Created December 15, 2013 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaydenseric/7980025 to your computer and use it in GitHub Desktop.
Save jaydenseric/7980025 to your computer and use it in GitHub Desktop.
Proposed syntax for SilverStripe template includes with content as a parameter like Sass mixin content.
<!------------------------ AboutPage layout -->
<header>
<!-- Header stuff -->
<header>
<% include HeroBanner %>
{$HeroBannerContent}
<% end_include %>
{$Content}
<footer>
<!-- Footer stuff -->
<footer>
<!------------------------ HeroBanner include -->
<div class="hero-banner">
<div class="wrapper">
<% if $ParameterContent %>
{$ParameterContent}
<% else %>
<h1>{$Title}</h1>
<% end_if %>
</div>
</div>
<!------------------------ Page layout -->
<header>
<!-- Header stuff -->
<header>
<% include HeroBanner %>
{$Content}
<footer>
<!-- Footer stuff -->
<footer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment