Skip to content

Instantly share code, notes, and snippets.

@luisfdeandrade
Last active December 20, 2015 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luisfdeandrade/6070766 to your computer and use it in GitHub Desktop.
Save luisfdeandrade/6070766 to your computer and use it in GitHub Desktop.
Fast codes smarty
{if $smarty.server.QUERY_STRING == "dispatch=products.view&product_id=301&stg"}
{foreach from=$navigation.tabs item=tab key=key name=tabs}
{if ((!$tabs_section && !$tab.section) || ($tabs_section == $tab.section)) && !$key|in_array:$empty_tab_ids}
{if !$active_tab}
{assign var="active_tab" value=$key}
{/if}
<div class="tabs clear cm-j-tabs">
<ul {if $tabs_section}id="tabs_{$tabs_section}"{/if}>
<li id="{$key}" class="{if $tab.js}cm-js{elseif $tab.ajax}cm-js cm-ajax{/if}{if $key == $active_tab} cm-active{/if}"><a{if $tab.href} href="{$tab.href|fn_url}"{/if}>{$tab.title}</a></li>
</ul>
</div>
<div class=" clear" id="tabss_content">
{$content}
</div>
{/if}
{$content|@var_dump}
{/foreach}
{/if}
{if $attachments_data}
<div id="content_attachments">
<ul id="lista_arquivos">
{foreach from=$attachments_data item="file"}
<li class="box_attachment icn{$file.tipoarquivo}"> <a class="att_title" href="{"attachments.getfile?attachment_id=`$file.attachment_id`"|fn_url}">{$file.description}</a><br /> <a class="att_link" href="{"attachments.getfile?attachment_id=`$file.attachment_id`"|fn_url}">Download</a></li>
{/foreach}
</ul>
</div>
<br />
<style="font-size: 11px; color:#666666; clear: both;">
Caso voc&ecirc; n&atilde;o possua os programas para leitura do arquivos, fa&ccedil;a o download dos mesmos atrav&eacute;s dos links a seguir: <br />
<a href="http://get.adobe.com/br/reader/" target="_blank">Leitor de PDF</a>
</p>
{/if}
{php}
$v = $this->_tpl_vars['n']['description'];
$v = truncateHtml($v,140);
echo $v;
{/php}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment