Skip to content

Instantly share code, notes, and snippets.

View robzor's full-sized avatar

Rob robzor

View GitHub Profile
@robzor
robzor / gist:3082389
Created July 10, 2012 09:53
Authenticate: Check on both types of errors
{if '{total_global_errors}' > 0 OR '{total_field_errors}' > 0}
<div id="flash-message">
{if total_global_errors > 0}
{global_errors}
<p>{error}</p>
{/global_errors}
{/if}
{if total_field_errors > 0}
{field_errors}
@robzor
robzor / gist:1710263
Created January 31, 2012 12:24
Playa strangeness
{exp:channel:entries channel="catentry" disable="member_data|pagination" url_title="{segment_3}"}
{if no_results}{redirect="404"}{/if}
<div id="detail_wrap" class="group">
{if "{exp:playa:total_parents channel='sumpaper'}" > 0}
<div class="fbox fb_yellow lo_fi" id="view_summpaper_link">
{exp:playa:parents limit="1" channel="sumpaper"}<a href="{site_url}summary-papers/{url_title}/">{/exp:playa:parents}View summary paper</a><span class="fb_more_info">This is a link to the summary paper</span>
</div>
{/if}
<h1>{title}</h1>
@robzor
robzor / gist:1704866
Created January 30, 2012 15:03
stashtastic
{exp:stash:set parse_tags="yes"}
{exp:search_fields
search:title="{exp:stash:get name='keywords' dynamic='yes'}"
channel="catentry"
parse="inward"}
{stash:search_results}{search_results}{/stash:search_results}
{stash:search_count}{search_count}{/stash:search_count}
@robzor
robzor / gist:1704391
Created January 30, 2012 13:28
stash fun
{exp:stash:set parse_tags="yes"}
{exp:search_fields
search:title="{stash:get name="keywords" dynamic="yes"}"
channel="catentry"
parse="inward"}
{stash:search_results}{search_results}{/stash:search_results}
{stash:search_count}{search_count}{/stash:search_count}