Last active
January 12, 2017 05:37
-
-
Save pitch-gist/5703847 to your computer and use it in GitHub Desktop.
Matrix Check
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
{exp:channel:entries channel="standard_page" limit="1"} | |
{embed="include/header"} | |
<div class="wrapper main-container"> | |
<article class="main-content"> | |
{!-- if there are no section fields content we are a standard content page --} | |
{if mx_standard_sections != "1"} | |
<hgroup> | |
<h2>{title}</h2> | |
<h3>{standard_introduction}</h3> | |
</hgroup> | |
{standard_content} | |
{/if} | |
{!-- if there are section fields we're a long page with jump to content | |
using simple conditions for performance http://www.derekallard.com/blog/post/simple-vs-complex-conditionals-in-expressionengine-templates --} | |
{if mx_standard_sections == "1"} | |
{mx_standard_sections} | |
{!-- different heading structure for first row --} | |
{if row_count == "1"} | |
<hgroup><h2 id="heading{row_count}">{heading}</h2></hgroup> | |
{content} | |
{/if} | |
{if row_count != "1"} | |
<h2 id="heading{row_count}">{heading}</h2> | |
{content} | |
{/if} | |
{/mx_standard_sections} | |
{/if} | |
</article><!-- end main content --> | |
</div> <!-- close wrapper, main-container --> | |
{embed="include/footer"} | |
{/exp:channel:entries} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment