Skip to content

Instantly share code, notes, and snippets.

View derekjones's full-sized avatar
🌴
On vacation

Derek Jones derekjones

🌴
On vacation
View GitHub Profile
{if layout:search_attorneys_count > 0 OR layout:search_offices_count > 0 OR layout:search_practice_areas_count > 0 OR layout:search_sub_practice_areas_count > 0 OR layout:search_representative_matters_count > 0 OR layout:search_insights_blogs_count > 0 OR layout:search_news_count > 0 OR layout:search_insights_count > 0 OR layout:search_awards_count > 0}
<div class="search-bar">
<ul class="search-bar-nav">
<li class="search-bar-nav-item">
<a href="#attorneys" class="search-bar-nav-link">All (<span id='search_count'>0</span>)</a>
</li>
{if layout:search_attorneys_count > 0}
<li class="search-bar-nav-item">
<a href="#attorneys" class="search-bar-nav-link">Attorneys ({layout:search_attorneys_count})</a>
</li>
{if parents:artifact_year != parents:count}
<a href="#" class="object-list-item close-modal show-modal" data-close-modal-query="#period-{parents:artifact_year}-artifact-{parents:count}" data-modal-query="#period-{parents:artifact_year}-artifact-{parents:count}">
<div class="object-list-img-wrap" style="background-image: url('/images/uploads/Narmer_Palette_pubdom.png');">
</div>
<h1>{parents:title}</h1>
</a>
{/if}
@derekjones
derekjones / _html-layout.html
Created July 12, 2016 18:44
Bubble up / inherit layout vars
<ul class="breadcrumbs">
<li><a href="/">Home</a></li>
{layout:breadcrumbs}
</ul>
@derekjones
derekjones / gist:3137d7cf6516db79f06a
Last active August 29, 2015 14:16
Entry's children's other parents
{exp:channel:entries channel="products"}
{manufacturers}
{manufacturers:parents channel="news"}
{manufacturers:parents:title}
{/manufacturers:parents}
{/manufacturers}
{/exp:channel:entries}
@derekjones
derekjones / gist:6687318
Last active December 23, 2015 20:09
ExpressionEngine pagination with ellipsis
{paginate}
{pagination_links}
<ul>
{previous_page}
<li><a href="{pagination_url}" class="page-previous">&lt;</a></li>
{/previous_page}
{first_page}
<li><a href="{pagination_url}" class="page-first">1</a> &hellip;</li>
{/first_page}
<?php
$foo = 'ox';
$bar = 'fox';
$ox = 'rocks';
$fox = 'socks';
echo "I have {$$foo} in my {$$bar} said the {$foo} to the {$bar}!";