Skip to content

Instantly share code, notes, and snippets.

@lincoln-chawora
Created November 25, 2019 11:42
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 lincoln-chawora/bb75b8904b0e4ebd0f8bf28ce9e1d276 to your computer and use it in GitHub Desktop.
Save lincoln-chawora/bb75b8904b0e4ebd0f8bf28ce9e1d276 to your computer and use it in GitHub Desktop.
How to render a template file in drupal 7
<?php print theme_render_template(drupal_get_path('theme', 'theme_name') . '/templates/theme/prompt-popup.tpl.php', array('prompt_paragraph' => $content['field_prompt_paragraph_reference'])); ?>
<div class="prompt-popup">
<div class="prompt__content">
<button class="prompt__close button-reset" aria-label="Close">×</button>
<?php echo render($prompt_paragraph) ?>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment