Created
May 7, 2009 16:11
-
-
Save phillipadsmith/108186 to your computer and use it in GitHub Desktop.
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
<%init> | |
# First, let's check for an associated media asset, which we need | |
my $media = $element->get_related_media or $burner->throw_error( | |
'Hey, you forgot to associate a media document! ', | |
'Please relate or upload an image for this story. ', | |
'You can upload JPEGs, GIFs, or PNGs.' | |
); | |
# Now let's re-size it for the thumbnail | |
my $image = $element->get_related_media; | |
my $thumb = $m->comp('/util/thumbnail.mc', image => $image); | |
# And publish it immediately | |
$burner->publish_another($_) for $thumb; | |
my $elem = $story->get_element; | |
my $rel_media = $elem->get_related_media; | |
my $med_uri = $rel_media->get_uri; | |
my $media_id = $rel_media->get_id; | |
</%init> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment