Created
April 23, 2012 12:54
-
-
Save moonbeetle/2470758 to your computer and use it in GitHub Desktop.
Using a Stash variable in ED ImageResizer, wrapped by a Stash conditional
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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