Hello,
I use Podhawk (wich use smarty to render page), my problem is that i need to fire multiple tabs with the same id per page. i'll paste here the basic of my index main template file. at the end of the posting loop i have the file : {include file="posting_meta.tpl"}
that loads the second block code below, witch then render the tabs.
my problem is, in the backend i have 2 post configured per page, what's happening is that when it has to render the second loop-post, id tab-1, id tab-2 have already been fired up and taken...
so the question is :
is there any way to dynamically give id's to tabs, so there would have has many id's has number of tabs.
does it even make sense ?
i could probably configure the backend admin to only show 1 post per page, and my problem is solved BUT
there must be another solution right ?
template :
code for the {include file="posting_meta.tpl"}
- <div id="tabs">
- <ul>
- <li><a href="#tabs-1">Download</a></li>
- <li><a href="#tabs-2">Share / Comments</a></li>
- <li><a href="#tabs-3">Meta</a></li>
- </ul>
- <div id="tabs-1">
- {* the download link *}
-
- <p>{include file='posting_download_link.tpl' barcode=true}</p>
- <p><a class="burnbit_torrent example7" burnbit_file="http://www.buzzworkers.com/{$posting.web_link}" burnbit_style="custom">
- <span class="burnbit_seeds"></span><span class="burnbit_peers"></span></a></p>
- <br />
- </div>
- <div id="tabs-2">
- <p>{$posting.share_this_button}</p>
- <p>{if $posting.comment_on == true}<a href="index.php?id={$key}#{if $settings.acceptcomments == 'disqus'}disqus_thread{else}comments{/if}" title="{$trans.link_comments}"> {$trans.comments} ({$posting_comments.$key|@count})</a>{/if}</p>
- </div>
- <div id="tabs-3">
- <p><img src="{$path_to_template}/images/tag.png" align="top" alt="Category" /> {$trans.categories} {foreach from=$posting_categories.$key item=category name=post_categories}<a href="index.php?cat={$category.name|html_to_url}" title="{$trans.link_categories} {$category.name}">{$category.name}</a>{if $smarty.foreach.post_categories.last == false} | {/if}{/foreach}</p>
- <p><img src="{$path_to_template}/images/tag.png" align="top" alt="Tag" /> {$trans.tags} {foreach from=$posting_tags.$key item=tag name=post_tags}
- <a href="index.php?tag={$tag|html_to_url}" title="{$trans.link_tags} {$tag|replace:'_':' '}">{$tag|replace:'_':' '}</a>{if $smarty.foreach.post_tags.last == false} | {/if}{/foreach}</p>
- {include file='posting_downloads.tpl' mp3_only=true}
- </div>
-
-
- </div>