Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Stash template (complicated)
{exp:stash:set name='ids'}0
{exp:playa:children entry_id="{structure:page:entry_id}" field="page_featured_employee"}
|{entry_id}
{exp:stash:append_list name='featured-list'}
{stash:team_member_urltitle}{url_title}{/stash:team_member_urltitle}
{stash:team_member_name}{person_firstname} {person_lastname}{/stash:team_member_name}
{stash:team_member_title}{person_title}{/stash:team_member_title}
{stash:team_member_bio}{person_bio}{/stash:team_member_bio}
{stash:team_member_email}{person_email}{/stash:team_member_email}
{stash:team_member_photo}
{exp:ce_img:pair src='{person_photo}' width='210' height='260' crop='yes' fallback_src='{loc:asset_url}images/no-photo.png' disable_xss_check='yes'}
<img width="{width}" height="{height}" src="{loc:asset_url}{made}" alt="{person_firstname} {person_lastname}, {person_title}" class="team-member">
{/exp:ce_img:pair}
{/stash:team_member_photo}
{stash:team_member_publications}
{exp:playa:parents channel="industry-insights"}
{if count == 1}
<h4 class="heading5"><a href="{path=industry-insights}/author/{child:url_title}">Recent Articles</a></h4>
<ul class="article-list">
{/if}
<li>{title}</li>
{if count == total_results}
</ul>
{/if}
{/exp:playa:parents}
{/stash:team_member_publications}
{stash:team_member_events}
{exp:playa:parents channel="events" show_future_entries="yes"}
{if count == 1}
<h4 class="heading5"><a href="{path=company/events}/attending/{child:url_title}">Upcoming Events</a></h4>
<ul class="event-list">
{/if}
<li>{entry_date format="%M %j, %Y"} - {title}</li>
{if count == total_results}
</ul>
{/if}
{/exp:playa:parents}
{/stash:team_member_events}
{/exp:stash:append_list}
{/exp:playa:children}{/exp:stash:set}
{!-- company our team page --}
{exp:channel:entries
parse="inward" {!-- needed for Stash --}
channel="company_directory"
disable="{global:disabled_params}"
dynamic="no"
orderby="person_lastname"
sort="asc"
entry_id="not {exp:stash:get name='ids'}"
status="not closed"}
{exp:stash:append_list name='team-list'}
{stash:team_member_urltitle}{url_title}{/stash:team_member_urltitle}
{stash:team_member_name}{person_firstname} {person_lastname}{/stash:team_member_name}
{stash:team_member_title}{person_title}{/stash:team_member_title}
{stash:team_member_photo}{person_photo} {/stash:team_member_photo}
{stash:team_member_detail_url}{path=details/company-directory/}/{channel_name}/{entry_id}/{/stash:team_member_detail_url}
{/exp:stash:append_list}
{/exp:channel:entries}
{exp:channel:entries
status="not closed"
disable="{global:disabled_params}"}
{exp:stash:set name="bodyclass"}
our-team
{if segment_1} internal{/if}
{/exp:stash:set}
{exp:stash:set name="content"}
<section class="section-internal">
<div class="top-shadow">
<div class="grid-group">
<div class="grid">
<h2 class="heading1">Our Team /</h2>
{exp:stash:get name='test'}
{exp:stash:get_list name="featured-list"}
<article class="article-our-team{if stash:absolute_count == 1} first{/if}" id="{team_member_urltitle}">
<div class="grid grid-team-image">
{team_member_photo}
</div>
<div class="grid grid-team-bio">
<h3 class="heading2">{team_member_name}, {team_member_title} <small>{exp:ce_str:ing encode_email_script}{team_member_email}{/exp:ce_str:ing}</small></h3>
<div class="wysiwyg">
{team_member_bio}
</div>
<!-- Pull in Industry Insights Listing -->
{team_member_publications}
<!-- Pull in Events Listing -->
{team_member_events}
</div>
</article>
{/exp:stash:get_list}
<ol class="list-team">
{exp:stash:get_list name="team-list"}
<li class="{switch='row|col2|col3|col4'}" id="{team_member_urltitle}">
{exp:ce_img:pair src='{team_member_photo}' fallback_src='{loc:asset_url}images/no-photo.png' filter="sharpen,20" width='100' height='105' crop='yes' disable_xss_check='yes'}
<img width="{width}" height="{height}" src="{loc:asset_url}{made}" alt="{team_member_name}" class="team-member">
{/exp:ce_img:pair}
<h5 class="heading4"><a href="{team_member_detail_url}" rel="modal" class="normal-modal" data-tmpl="company-directory">{team_member_name}<br> {team_member_title}</a></h5>
</li>
{/exp:stash:get_list}
</ol>
</div>
</div>
</div>
</section>
{/exp:stash:set}
{/exp:channel:entries}
{embed="layouts/_interior-page"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.