Skip to content

Instantly share code, notes, and snippets.

@moonbeetle
Created April 23, 2012 12:54
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 moonbeetle/2470758 to your computer and use it in GitHub Desktop.
Save moonbeetle/2470758 to your computer and use it in GitHub Desktop.
Using a Stash variable in ED ImageResizer, wrapped by a Stash conditional
/* Assumes you SET the necessary Stash variables FIRST, then in your template output them like so: */
{!-- Recipe of the week --}
<h3>{gv_recipeoftheweek_{ln}}</h3>
{if {exp:stash:not_empty name='recipe_img' type='variable'}}
<a href="{title_permalink='recipes/detail'}" class="thumbframe">
{exp:ed_imageresizer image="{exp:stash:get name='recipe_img'}" maxWidth="128" cropratio="1:1" alt="{exp:stash:get name='recipe_title'}" parse="inward"}
</a>
{/if}
<a href="{title_permalink='recipes/detail'}"><h4>{exp:stash:get name='recipe_title'}</h4></a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment