Frontend Template System
Bitders uses Smarty templating engine to display dynamic content. Here's a comprehensive guide to the main template loops and their usage.
Investment Plans Display
Display investment plans using this loop:
{foreach from=$index_plans item=p}Available Variables:
{$p.name}- Plan name{$p.etype}- Plan type (0: fixed, 1,2: range){$p.frequency}- Payout frequency{$p.period}- Period duration{$p.days}- Total days
Usage Example:
{foreach from=$index_plans item=p}
<div class="card">
<div class="card-header">
{$p.name|escape:html}
</div>
<!-- Plan details here -->
</div>
{/foreach}Recent Transactions
Display recent transactions using:
{foreach from=$last_transactions item=s}Available Variables:
{$s.type}- Transaction type{$s.datetime}- Transaction time{$s.username}- User's name{$s.currency}- Currency used{$s.amount}- Transaction amount
Usage Example:
{foreach from=$last_transactions item=s}
<tr>
<td>{$s.type}</td>
<td>{$s.datetime|time_elapsed_string}</td>
<!-- Other transaction details -->
</tr>
{/foreach}News Section
Display news items using:
{foreach from=$news key=key item=value}Available Variables:
{$value.title}- News title{$value.datetime}- Publication date{$value.content}- News content{$value.image_url}- News image{$value.link}- Full article link
Usage Example:
{foreach from=$news key=key item=value}
<div class="card">
<img src="{$value.image_url}" alt="{$value.title}">
<!-- News content here -->
</div>
{foreachelse}
<!-- No news found message -->
{/foreach}User Reviews
Display user reviews using:
{foreach from=$last_reviews item=s}Available Variables:
{$s.uname}- Reviewer's name{$s.datetime}- Review time{$s.review}- Review content
Usage Example:
{foreach from=$last_reviews item=s}
<div class="card">
<div class="card-body">
<h5>{$s.uname|escape:html}</h5>
<!-- Review content here -->
</div>
</div>
{/foreach}Affiliate Program Structure
Display affiliate program details using:
{for $i=1 to $settings.referral.levels}
{foreach $settings.referral.tier as $tierId => $tier}Available Variables:
{$tier.name}- Tier name{$tier.level}- Commission levels{$tier.invested}- Required investment{$tier.investments}- Team investment{$tier.referrals}- Required referrals
Usage Example:
<table class="table">
<tr>
<th>Tier</th>
<!-- Table headers -->
</tr>
{foreach $settings.referral.tier as $tierId => $tier}
<!-- Tier details here -->
{/foreach}
</table>Payment Methods
Display payment methods using:
{section name=p loop=$ps}Available Variables:
{$ps[p].id}- Payment method ID{$ps[p].name}- Payment method name
Usage Example:
{section name=p loop=$ps}
<div class="col-sm-2">
<img src="images/icons/{$ps[p].id}.svg" class="img" width="30px" />
{$ps[p].name}
</div>
{/section}Important Notes
All template files are stored in the
templatesdirectoryCustom modifications should be made in child themes
Always escape HTML output using
|escape:htmlUse Bootstrap classes for responsive layouts
Image paths are relative to the root directory
Support
For additional support or custom template modifications, please contact:
Email: [email protected]
Documentation: https://docs.bitders.com
Support Hours: 24/7
Last updated