Last active
December 3, 2018 23:27
-
-
Save dasginganinja/0e53c29139d6aee45c67c4ec37556163 to your computer and use it in GitHub Desktop.
try this to see if the variable is set. This is normally set in template_preprocess_node() in template.php. Look for mentions of this variable in your code.
This file contains hidden or 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
<?php | |
/* | |
* @file | |
* Default theme implementation to display text_page nodes. | |
* | |
* @see template_preprocess() | |
* @see template_preprocess_node() | |
* @see template_process() | |
*/ | |
?> | |
<?php | |
if(!empty($hero_uri)){ | |
$hero_image = image_style_url('inner_hero',$hero_uri); | |
$hero_image_mobile = image_style_url('inner_hero_mob',$hero_uri); | |
drupal_add_css('@media only screen and (min-width:768px){.rowHero{background-image:url('.$hero_image.');}}@media only screen and (max-width:767px){.rowHero{background-image:url('.$hero_image_mobile.');}}', array('type' => 'inline')); | |
} else { | |
print '<h2><blink>No $hero_uri is set. Check template.php for this theme.</blink></h2>'; | |
} | |
?> | |
<?php if (isset($hero_image)) { ?> | |
<section class="row rowHero"> | |
<div class="hero col-xs-12"> | |
<div class="titleAngleWrap"> | |
<div class="titleRow angled"> | |
<div class="contentWidth"> | |
<h1><?php print $title; ?></h1> | |
</div> | |
</div> <!-- titleRow --> | |
</div> | |
</div> <!-- end hero column --> | |
</section> <!-- END- rowHero --> | |
<?php } else { ?> | |
<section class="row rowNoHero"> | |
<div class="hero col-xs-12"> | |
<div class="titleAngleWrap"> | |
<div class="titleRow angled"> | |
<div class="contentWidth"> | |
<h1><?php print $title; ?></h1> | |
</div> | |
</div> <!-- titleRow --> | |
</div> | |
</div> <!-- end hero column --> | |
</section> <!-- END- rowHero --> | |
<?php } ?> | |
<div id="node-<?php print $node->nid; ?>" class="col-xs-12 containingCol catchallCol <?php print $classes; ?>"<?php print $attributes; ?>> | |
<div class="row breadCrumbs"> | |
<div class="contentWidth"> | |
<div class="col-xs-12"> | |
<?php print theme('breadcrumb', array('breadcrumb'=>drupal_get_breadcrumb())); ?> | |
</div> | |
<?php if (in_array('administrator', array_values($user->roles)) || in_array('editor', array_values($user->roles))) : ?> | |
<div><?php print l('Edit Content', 'node/' . $node->nid . '/edit', array('query' => drupal_get_destination())); ?></div> | |
<?php endif; ?> | |
</div> | |
</div> <!-- END- bread --> | |
<div class="row mainContent"> | |
<div class="contentWidth"> | |
<main class="col-sm-8 col-xs-12 bodyContent" id="mainContent"> | |
<h1><?php print $title; ?></h1> | |
</main> <!-- END- bodyContent --> | |
</div> <!-- END- mainContent --> | |
<?php print render($content['body']); ?> | |
</div> <!-- END- mainContent --> | |
</div> <!-- END - containingCol --> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment