Last active
August 29, 2015 14:10
-
-
Save josephmosby/9bde6368d123ee3ee82a to your computer and use it in GitHub Desktop.
TPLS
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
/* FOR LE TEMPLATE.PHP | |
/* THIS CODE CALLS A CUSTOM PAGE.TPL FILE IF YOU HAVE A SPECIFIC CONTENT TYPE | |
function plstwo_preprocess_page(&$vars) { | |
if (isset($vars['node']->type)) { | |
$vars['theme_hook_suggestions'][] = 'page__' . $vars['node']->type; | |
} | |
} | |
/* --------------- */ | |
<?php render($page['content']['metatags']); ?> | |
<!-- Top Menu Section --> | |
<div class="wrapper header-wrapper"> | |
<div class="container" id="top_menu"> | |
<div class="row"> | |
<div class="col-md-6"> | |
<?php print render($page['sm_icons_top']); ?> | |
</div> | |
<div class="col-md-6"> | |
<?php print render($page['links_top']); ?> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-mid-12"> | |
<?php print render($page['main_menu']); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="wrapper secondary-menu-wrapper"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-mid-12"> | |
<?php print render($page['secondary_menu']); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- end Top Menu Section --> | |
<div class="wrapper introduction-wrapper" id="introduction"> | |
<div class="container introduction-container"> | |
<div class="row"> | |
<div class="col-mid-12"> | |
<h1><?php print_r($title); ?></h1> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-mid-12"> | |
/* HOW TO RENDER A FIELD FROM PAGE.TPL.PHP | |
/* YMMV IF YOU DO THIS FROM NODE.TPL (as the $node variable may be slightly different) | |
<?php print_r($node->field_introduction['und'][0]['value']); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="wrapper box-1-wrapper" id="box-1"> | |
<div class="container box-1-container"> | |
<div class="row"> | |
<div class="col-mid-12"> | |
<?php | |
$path = current_path(); | |
if($path == 'node/18') { | |
print_r($node->field_box_1['und'][0]['value']); | |
$webform = module_invoke('webform', 'block_view', 'client-block-17'); | |
print render($webform['content']); | |
} else { | |
print_r($node->field_box_1['und'][0]['value']); | |
} | |
?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="wrapper box-2-wrapper" id="box-2"> | |
<div class="container box-2-container"> | |
<div class="row"> | |
<div class="col-mid-12"> | |
<?php | |
$path = current_path(); | |
if($path == 'node/2') { | |
print_r($node->field_box_2['und'][0]['value']); | |
$block = module_invoke('views', 'block_view', 'bios-block'); | |
$block_1 = module_invoke('views', 'block_view', 'bios-block_1'); | |
print render($block); | |
print render($block_1); | |
} else { | |
print_r($node->field_box_2['und'][0]['value']); | |
} | |
?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="wrapper box-3-wrapper" id="box-3"> | |
<div class="container box-3-container"> | |
<div class="row"> | |
<div class="col-mid-12"> | |
<?php print_r($node->field_box_3['und'][0]['value']); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Begin Footers --> | |
<div class="wrapper follow-us-wrapper"> | |
<div class="container follow-us-container"> | |
<div class="row"> | |
<div class="col-mid-12"> | |
<?php print render($page['follow_us']); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="wrapper logos-wrapper"> | |
<div class="container logos-container"> | |
<div class="row"> | |
<div class="col-mid-12"> | |
<?php print render($page['logos']); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="wrapper footer-wrapper"> | |
<div class="container footer-container"> | |
<div class="row"> | |
<div class="col-mid-12"> | |
<?php print render($page['footer_menu']); ?> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-mid-12"> | |
<?php print render($page['footer_copyright']); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- End Footers --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment