Club Variables
Show your Club tiers, prices, benefits and the visitor's membership anywhere on your site with a Custom Twig Block, or replace your Club page with your own design.
Club data can be used in two places:
A Custom Twig Block on any page, using the Club (membership tiers) variable type. Use this to promote your Club on your homepage or competition pages.
A custom Club page, which replaces the built-in page at
yoursite.com/club.
In a Custom Twig Block
Add a Custom Twig Block to a page.
Add a variable, name it
club, and choose the type Club (membership tiers).Use it in your template.
The type only appears in the list while your Club is switched on. If you later switch the Club off, the variable is empty, so always wrap your template in {% if club.enabled %}:
{% if club.enabled %}
<h2>Join {{ club.name }}</h2>
{% for tier in club.tiers %}
<div>
<h3>{{ tier.name }}: {{ tier.price_display }}</h3>
<ul>
{% for benefit in tier.benefits %}
<li>{{ benefit.description }}</li>
{% endfor %}
</ul>
<a href="{{ tier.join_url }}">Join {{ tier.name }}</a>
</div>
{% endfor %}
{% endif %}Custom Club Page
Click Club in the left-hand menu, then Advanced (under Setup).
Switch on Use a custom landing page.
Write your template in Landing page template (HTML + Twig). Your site header and footer stay in place around it.
Click Save.
On the custom Club page the data is split into separate variables rather than one club variable. Use club, tiers, main_competition, daily_draw, member and user directly (for example {% for tier in tiers %}). There is no club.enabled here, because the page only shows while the Club is on. Your Settings Variables (settings) work here too, and the same tags and filters as every other template (see Filters Reference).
The custom page only appears when Club enabled and Show the Club landing page are both on in Club Settings.
Club
club.enabled
True while the Club is on (Custom Twig Block only).
club.name
Your Club display name.
club.description
Your Club description.
club.url
The link to your Club page. Empty if Show the Club landing page is off.
club.terms_url
The link to your Club terms, if set.
club.cancellation_wording
Your cancellation wording, if set.
club.currency_icon
Your currency symbol, for example £.
club.tiers
Your active tiers (see below).
club.main_competition
Your linked main competition (see below).
club.daily_draw
Your daily draw schedule (see below).
club.member
The visitor's own membership (see below).
club.user
The visitor (see below).
Tiers
Loop through club.tiers (or tiers on the custom Club page). Tiers come in the order you set in the admin panel.
tier.name
Tier name
Gold
tier.description
Tier description
tier.featured_image_url
Tier image (empty if none)
tier.price
Monthly price
£9.99
tier.price_raw
Monthly price as a number
9.99
tier.price_display
Monthly price with interval
£9.99 / month
tier.yearly_enabled
Whether yearly billing is offered
true
tier.yearly_months_free
Months free on yearly
2
tier.yearly_price
Yearly price
£99.90
tier.yearly_price_display
Yearly price with interval
£99.90 / year
tier.yearly_per_month
Yearly price per month
£8.32
tier.join_url
Link for your Join button
tier.benefits
A list of benefits (see below)
tier.rewards
A list of milestone rewards (see below)
Benefits (tier.benefits)
The easiest field to use is benefit.description, a ready written sentence such as "£5.00 site credit each month" or "1 daily draw entry per day".
benefit.description
A ready written sentence describing the benefit.
benefit.type
site_credit, competition_entries, cashback or reward.
benefit.cadence
per_payment, daily, per_order (cashback) or milestone (milestone rewards).
benefit.quantity
Number of entries (entries only).
benefit.amount
Credit amount, for example £5.00 (site credit only).
benefit.percentage
Cashback rate, for example 5% (cashback only).
benefit.cap
Monthly cashback cap, empty if none (cashback only).
Rewards (tier.rewards)
reward.title
The reward, for example "Tartan gift".
reward.threshold
Paid months needed to earn it.
reward.description
The reward description, if any.
Main Competition
club.main_competition (or main_competition) is your linked main competition, with the same fields as a competition in the Products variable, such as title, url, image_url and draw_date. It is empty if no competition is linked. Check is_active before promoting it.
Daily Draw
daily_draw.enabled
Whether a daily draw is running
true
daily_draw.name
The daily draw name
Daily Cash Draw
daily_draw.entry_time
When entries are added
9:00am
daily_draw.draw_time
When it is drawn
8:00pm
daily_draw.rhythm
A ready written sentence
Entries are added daily at 9:00am and drawn at 8:00pm.
In a Custom Twig Block, use club.daily_draw.
The Visitor's Membership
club.member (or member) describes the person viewing the page, so you can show different content to members and non-members.
member.is_member
True if they hold a membership that has not ended. This includes a join still being confirmed, a failed payment and a suspended membership. Use it to decide what to show.
member.status
The membership status: pending, active, past_due (payment failed), suspended, cancelled or expired.
member.tier_name
Their tier.
member.payment_failed
True if their last payment failed. Keep showing Join buttons, so they can rejoin with a new card.
member.is_comp
True if it is a free membership you gave them.
member.comp_until
When their free membership ends (empty if it does not end).
member.my_club_url
Link to their My Club page.
The visitor (club.user, or user)
user.is_logged_in
True if they are logged in.
user.display_name
Their name, or "Guest".
user.balance
Their site credit balance, formatted (empty for guests).
AI Context
For AI Assistants: This documents RaffleX Club (paid membership) data for Twig templates.
Where it is available:
Custom Twig Block: a user variable of type Club (membership tiers), usually named
club. Only offered while the Club is on; renders empty when the Club is off, so wrap everything in{% if club.enabled %}. Nested keys:club.tiers,club.main_competition,club.daily_draw,club.member,club.user.Custom Club landing page (admin: Club, then Advanced): top level variables
club,tiers,main_competition,daily_draw,member,user, plussettings. Noclub.enabled.
Shapes:
club:enabled,name,slug,description,url(null when the landing page is hidden),terms_url,cancellation_wording,currency_icontiers[]:id,name,slug,description,featured_image_url,price,price_raw,price_display,yearly_enabled,yearly_months_free,yearly_price,yearly_price_raw,yearly_price_display,yearly_per_month,yearly_per_month_raw,join_url,benefits[],rewards[]benefits[]:type(site_credit,competition_entries,cashback,reward),cadence(per_payment,daily,per_order,milestone),quantity,amount,amount_raw,percentage,percentage_raw,cap,cap_raw,description. Milestone rewards appear here as well as inrewards[].rewards[]:title,threshold(paid months),descriptionmain_competition: same fields as a Products competition, or nulldaily_draw:enabled,name,entry_time,draw_time,rhythm(null values when no daily draw)member:is_member,status,tier_name,tier_slug,payment_failed,is_comp,comp_until,my_club_urluser:is_logged_in,display_name,balance,balance_raw
Key notes: Same sandbox, tags and filters as the Custom Twig Block. Branch on member.is_member, not member.status. Keep Join buttons visible when member.payment_failed is true. Only promote main_competition when is_active is true and it has not ended or sold out.
Last updated