September
26th
2007
I get asked, occasionally. for my Tag templates, to see how I'm accomplishing pulling in gallery entries, link entries, and weblog entries. I'm actually doing all of this, and the clouds, in one template. This requires Tag 2.0 onwards; here it is for future reference:
<div id="gallery">
{if segment_3 != ""}
<div class="breadcrumb"><a href="{path="{dem_group}/tags"}">Tag Cloud</a> > {segment_3} </div>
<div class="clear"> </div>
{/if}
{exp:tag:gallery_entries gallery="gallery" inclusive="yes" orderby="entry_date" sort="asc" limit="20" marker="tags" columns="5" rows="3"}
{entries}
{row_start}<div class="gallery_row">{/row_start}
{row}
<div class="thumbnail">
<a href="{id_path=mementos/flashback}"><img src="/photos/thumb_{filename}" width="100" height="100" alt="{title}" title="{title}" /></a><br />{title}
</div>
{/row}
{row_blank}<div class="clear"> </div>{/row_blank}
{row_end}</div>{/row_end}
{/entries}
{/exp:tag:gallery_entries}
<div class="clear"></div>
</div>
<div id="history">
{if segment_3 == ""}
<h2>Entries Tag Cloud</h2>
{exp:tag:cloud weblog="dem|links|writing" backspace="3" groups="20" step="1" limit="100"}<a href="{path="{dem_group}/tags"}{websafe_tag}" style="font-size:{step}px; "title="{tag_name} - {count} entries" >{tag_name}</a>, {/exp:tag:cloud}
<h2>Mementos Tag Cloud</h2>
{exp:tag:cloud gallery="gallery" backspace="3" groups="20" step="1" limit="100"}<a href="{path="{dem_group}/tags"}{websafe_tag}" style="font-size:{step}px; "title="{tag_name} - {count} entries" >{tag_name}</a>, {/exp:tag:cloud}
</div>
{if:elseif segment_3 != ""}
<ul>
{exp:tag:entries weblog="dem|links|writing" limit="20" marker="tags" dynamic="off" tag="{segment_3}"}
{if weblog_short_name == "links"}
<li style="list-style-image: URL('/images/copy.gif');"> <a href="{links_url}" rel="{links_xfn}" title="{title}">{title}</a><img src="{links_image}" class="floatpicright" alt="{title}" height="20" width="20" />
<ul style="list-style: none;">
<li>{links_description}</li>
<div class="clear"> </div>
</ul>
</li>
{if:else}
<li style="list-style: none;"><a href="{comment_url_title_auto_path}">{title}</a> ({comment_total} responses) {if weblog_short_name == "{friends_blog}"} - {weblog}{/if}</li>
{/if}
{/exp:tag:entries}
</ul>
</div>
You can see it in action on the Cats Tag Page and, of course, on the tag cloud page.
Have fun!