Skip to content

Instantly share code, notes, and snippets.

@airways
Created January 17, 2011 19:19
Show Gist options
  • Save airways/783304 to your computer and use it in GitHub Desktop.
Save airways/783304 to your computer and use it in GitHub Desktop.
{exp:lg_replace:haystack needles="{embed:image_needles}"}
{exp:weblog:entries
weblog="{embed:weblog}"
dynamic="off"
limit="1"
status="open"
disable="{global:disabled_params}"
category="{ss:current_cat_id}"
track_views="one"
entry_id="{embed:entry_id}"}
{!-- fetch the requested page of the given field --}
{exp:article_pagination:show_page
token="page_break"
page="{get:article_page}"}
{{embed:body_field}}
{/exp:article_pagination:show_page}
{!-- image tokens --}
{exp:channel_images:images entry_id="{embed:entry_id}" parse="inward"}
{exp:lg_replace:replacement needle="image_{image_id}:callout"}
<span class="article_body_media">
<span class="thumbnail"><a href="{ss:current_domain}gallery/{embed:url_title}/">
{!--<img src="{exp:imgsizer src='{image_url:crop-square}' width='102}" alt="{image:description}" />--}
{exp:imgsizer:size src="{image_url:crop-square}" width="102" alt="{image:description}"}
</a></span>
<span class="media_callout">
<span class="title">{if image:title}{image:title}{/if}</span>
<span class="description">{if image:description}{image:description}{/if}</span>
<a href="{ss:current_domain}gallery/{embed:url_title}/1" class="more">View Gallery</a>
</span>
<span class="clear"></span>
</span>
{/exp:lg_replace:replacement}
{exp:lg_replace:replacement needle="image_{image_id}:cover"}
<img src="{image_url:crop-cover}" alt="{image:description}" />
{/exp:lg_replace:replacement}
{exp:lg_replace:replacement needle="image_{image_id}:wide"}
<img src="{image_url:crop-wide}" alt="{image:description}" />
{/exp:lg_replace:replacement}
{exp:lg_replace:replacement needle="image_{image_id}:landscape"}
<img src="{image_url:crop-landscape}" alt="{image:description}" />
{/exp:lg_replace:replacement}
{exp:lg_replace:replacement needle="image_{image_id}:square"}
<img src="{image_url:crop-square}" alt="{image:description}" />
{/exp:lg_replace:replacement}
{/exp:channel_images:images}
{!-- videos tokens --}
{videos}
{exp:lg_replace:replacement needle="video_{entry_id}"}
{exp:brightcove_video requested_video="{video_id}"}
<span class="article_body_media">
<span class="thumbnail"><a href="{ss:current_domain}videos/view/{video_id}/">
<img src="{video_thumbnail_url}" width="106" alt="{video_short_desc}" />
</a></span>
<span class="media_callout">
<span class="title">{video_name}</span>
<span class="description">{video_short_desc}</span>
<a href="{ss:current_domain}videos/view/{video_id}/" class="more">Play Video</a>
</span>
<span class="clear"></span>
</span>
{/exp:brightcove_video}
{/exp:lg_replace:replacement}
{/videos}
{/exp:weblog:entries}
{/exp:lg_replace:haystack}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment