Knowledgebase & Documentation
Our documentation is the best way to get immediate answers and guidance. We also provide numerous references for the more advanced features and functionality such as the CMS and the API.
Special Functions in the CMS
The Offer Grid Loop
From home.html:
{% for row in rb_offers|group_by:3 %}
<tr>
{% for offer in row %}
<td>
<div id="pas_offers_grid">
<a href="{{ offer.review_page }}"><img src="{{ tld }}{{ offer.image }}" alt="" border="0"/></a><br />
<h1>{{ offer.name }}</h1>
<h2>{{ offer.reward }} Rakeback</h2>
<h2>{{ offer.type }} Offer</h2>
<h4>Network: {{ offer.poker_room.network }}</h4>
<h4>Rake: {{ offer.rake_type }}</h4>
<h4>Statistics: {{ offer.stats_updated }}</h4>
<h3>{{ offer.bonus }}</h3>
<h3>Signup Bonus</h3>
<a href="{{ offer.review_page }}" class="pas_button">Get Rakeback Now!</a>
</div>
</td>
{% endfor %}
</tr>
{% endfor %}
Explanation
{% for row in rb_offers|group_by:3 %} : Start creating a list of offers with 3 cells or offers to each table row.
{% for offer in row %} : Display all the following for each offer in the appropriate row, as specified in the group by instruction above.
{% endfor %} : Repeat everything in the corresponding for instruction until there are no more items to display.
The Fragment Function
Exists on many pages:
{% fragment pas_promotions/descriptions/rake_chase_description.html %}
Explanation
{% fragment path/name.html %} - Fetch the code that is in the page at the indicated path and display it here.
The Offer Signup Box
From rakeback > poker-room.html:
{% if signed_in %}
{% if offer.requires_preloaded_tracker? %}
{% insert javascript from forms/room-signup-form/preloaded-sections.html %}
{% insert step2 from forms/room-signup-form/preloaded-sections.html %}
{% endif %}
{% fragment forms/room-signup-form/rakeback-signup/signup-rakeback-member.html %}
{% else %}
{% fragment forms/room-signup-form/rakeback-signup/signup-rakeback-visitor.html %}
{% endif %}
Explanation
{% if signed_in %} : If the member viewing this page is signed in show everything until the else is encountered.
{% if offer.requires_preloaded_tracker? %} : Check to see if this particular offer needs to generate a custom bonus code for the member. If it does process the code until the next endif.
{% insert javascript from forms/room-signup-form/preloaded-sections.html %} : If a custom bonus code is required (and the member is signed in) show the javascript section from the preloaded-sections.html file.
{% insert step2 from forms/room-signup-form/preloaded-sections.html %} : If a custom bonus code is required (and the member is signed in), also show the step 2 section from the preloaded.sections.html file.
{% endif %} : End this if statement.
{% fragment forms/room-signup-form/rakeback-signup/signup-rakeback-member.html %} : If the member is signed in, show the code from the signup-rakeback-member.html page.
{% else %} : Do the following if the member is not signed up or signed in.
{% fragment forms/room-signup-form/rakeback-signup/signup-rakeback-visitor.html %} : If the member is not signed in, run the signup-rakeback-visitor.html code.
{% endif %} : End the original if statement checking if the page viewer is signed in.