Skip to content

Instantly share code, notes, and snippets.

@ritcheyer
Last active August 29, 2015 14:06
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 ritcheyer/9d40f4c4e7ce544ba776 to your computer and use it in GitHub Desktop.
Save ritcheyer/9d40f4c4e7ce544ba776 to your computer and use it in GitHub Desktop.
<?php
/**
* implementation of hook_panels_layouts
*/
// Plugin definition
$plugin = array(
'title' => t('Updates'),
'category' => t('Tesla minipanels'),
// 'icon' => 'default_template.png',
'theme' => 'updates_minipanel',
'theme arguments' => array('id', 'content'),
'css' => 'updates_minipanel.css',
'regions' => array(
'blog_press' => t('Blog and Press Updates'),
'customer_stories' => t('Customer Stories'),
),
);
<?php if ($content['blog_press'] || $content['customer_stories']): ?>
<section class="section-updates content-constrain">
<div class="updates-wrap">
<h1 class="section-title alternate">Updates</h1>
<?php if ($content['blog_press']): ?>
<div class="blog-press">
<?php print $content['blog_press']; ?>
<p class="view-all"><a href="/blog" title="">All blogs and press releases</a></p>
</div>
<?php endif; ?>
<?php if ($content['customer_stories']): ?>
<aside class="customer-stories">
<?php print $content['customer_stories']; ?>
<p class="view-all"><a href="/customer-stories" title="">All customer stories</a></p>
</aside>
<?php endif; ?>
</div>
</section>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment