Tokens and Variables
The following tokens and liquid variables can be used in a variety of locations throughout the site, but primarily on course-related pages and static pages (e.g. home page). They are not, unless specified otherwise, supported elsewhere (e.g cases, articles or multiple-choice question, user biography, etc.)
IMPORTANT NOTES:
- all the tokens below are listed with spaces between the {{ and the token. This is so that this page does not attempt to render them. When using all these tokens, do not use space between {{ or }} and the token.
- beware of copy-pasting these token as invisible style markup will stop these working. Clear text formatting (Tx) in the tool bar to fix them if they are not working.
On this page:
|
Article
- embed (part of) an article
- token: {{ article:id;}} Embed an article
- available in: courses
- e.g. {{ article:pituitary-gland }} = embeds whole article
- e.g. {{ article:pituitary-gland,gross-anatomy }} = embeds from “gross anatomy” title to end of article
- e.g. {{ article:pituitary-gland,gross-anatomy,relations }} = embeds from “gross anatomy” title and ends just before the “relations” title
- e.g. {{ article:pituitary-gland,top,relations }} = embeds from top of article and ends just before the “relations” title
Boxed Text
- Available in: courses, restricted pages and pages
- Styles: A variety of styles are available (see below) which broadly match /patterns
- Opened/closed: If 'initially' is specified as "opened" or "closed", the panel is collapsible; otherwise it is not.
- Just heading: If no panel body is being supplied, use {{ begin_box_text_header:no_body}} instead of {{ begin_box_text_header}}, to ensure the borders render correctly.
- Countdown: Adds a countdown timer in the box header to countdown to the next event in the live schedule, use {{ begin_box_text_header:countdown=event}}
- id: allows the box to be targetted by a URL anchor e.g. .../pages/1234#some-text will scroll down to the box and open it if "initially=closed"
- Sample use follows
{{ begin_box_text:style=info&initially=closed&id=some-text }}
Heading
Case
- embed a case study
- token: {{ case_study:id,parameter1,parameter2,etc..}}
- note: this is the study ID not the vID. You can find this by looking at the URL of the case in presentation mode or go to the study, right-click on the study header and “inspect element” and then search for "study-desc"
- parameters available (can be combined)
- can_download
- logged_in
- show_annotation_tool
- show_findings
- show_findings_text_only
- attribution
- {{ case:vid,title }}
- {{ case:vid,rid }} - redundant
- {{ case:vid,author }} full name (first, middle, surname) without title or qualifications
- {{ case:vid,doi }} e.g. https://doi.org/10.53347/rID-182123
- {{ case:vid,publication_date }} e.g. 24 Janunary 2025
Certificates and CME
Certificate on courses and restricted pages
The certificate generate button which calls a certificate template with or without text and input claimed number of points can be added using the following:
{{ certificate:template_name }} generates just the button. The template name should be lowercase with underscores. i.e if the name is Standard Template, it should read {{ certificate:standard_template }}
available parameters to be added after <template_name>?parameter1=x¶meter2=Y etc...
text_for_input - replaces Standard formatted AMA text with any text you want
credit_max=8 - set max number of credits to 8
credit_max=duration - uses duration of the restricted page to calculate max time (use with credit_step=0.25)
credit_step=0.25 - rounds duration down in 0.25 credit (15min) blocks
multiplier=1.3333334 - multiplies duration by 1.333334 before rounding.
Both credit_max and credits claimed from the input box will be passed back to the certificate template.
Multiple certificates per course
Sometimes a course will have multiple restricted pages and only a single certificate at the end (e.g. a learning pathway). Other times multiple restricted pages will each have a certificate (e.g. case reads). The way {{ if:certificate_generated}} is evaluated depends on the {{ }} tags contained by the certificate template.
If the certificate template includes any {{ course...}} tag then {{ if:certificate_generated}} will be TRUE if any certificate has been generated for the whole course (i.e. multiple certificates will not work).
If the certificate template does NOT include and {{ courses....}} tags, then it will be evaluated only against the restricted page it is on, and therefore multiple certificates are possible.
Certificate templates
- Most (all?) the user tokens, courses and restricted page tokens and conditional tokens work but depending on where they are used they may lead to unpredictable responses.
- {{ cme_attribution }} generates AMA PRA Category 1 Credits ™ (including italics and TM)
{{ credits_claimed }} available if
{{ credits_max }}
{{ text_input:description }} is used for one-off certificates for custom text e.g. "text_input:month and year e.g. January 2025"
{{ current_case:title }}
{{ current_case:rid }}
{{ current_case:author }} full name (first, middle, surname), without title or qualifications
{{ current_case:doi }} e.g. https://doi.org/10.53347/vID-182123
{{ current_case:publication_date}} e.g. 24 January 2025
In the sections of the certificate that are "Cormorant" font (First line, Paragraphs 1 and 2 and below timestamp and signatures) italics and bold are available as HTML <i></i> and <b></b>. These can be used in combination with tokens.
Certificate context
Certificate templates have a field called "context". This is used for the third column of the CME profile page.
If left blank, it will use:
- {{ current_course:title}} if a course level token is used in the template, and this will be a link to the course
- otherwise, it will be blank
Alternatively, context can include or more of the following, which will render as plain text (no links):
- plain text e.g. "Radiopaedia 2025"
- {{ current_course:title}}
- {{ current_restricted_page:title}}
- {{ current_page:citation_title}}
- {{ current_page:citation_publication_date}}
- {{ current_page:citation_author}}
- {{ current_page:citation_conference_title}}
- {{ current_page:doi}}
- {{ text_input:month and year e.g. January 2025}} - for manual generation
Generate one-off certificates
You can generate one-off certificates using a template. When you click "generate" you will be prompted to supply all the data the template needs to complete the certificate and then the certificate will be stored against that user.
Conditional display
- {{ if:after_timestamp=1624442759}} changes visibility at June 23, 2021
- { if: author_of_this_page }} - only available restricted pages- more info
- {{ if:before_timestamp=1624442759}} changes visibility at June 23, 2021
- use https://timestampgenerator.com/ or equivalent to generate timestamp
- {{ if:certificate_generated}} controls visibility to users with a certificate for this page/course and matches to course title (if any {{ courses... }} tags are used in the certificate, or individual restricted pages if not. See above.
- {{ if:country_is=US,AU}} matches anyone in the US.
- {{ if:course_access=all-access-course-pass}} controls visibility to users who appear on the non-expired registrants list for that course
- {{ if:course_access_expires_before_days=all-access-course-pass:-30}}
- matches anyone whose registration to that course expired at least 30 days ago.
- you can omit the course slug to test against just the current course (e.g. {{ if:course_access_expires_before_days=-30}}
- {{ if:current_page_tags=args_1,args_2 }} - only available restricted pages- more info
- {{ if:current_course=course_slug}}
- supports multiple course slugs separated by commas
- supports _OR and _NOR e.g. {{ if:current_course_OR=&course_slug,course_slug2}}
- works on courses and linked restricted pages
- {{ if:current_restricted_page=1234 }} matches if the page being viewed is /pages/1234
- {{ if:date_access_granted_is_before=123456789}} and {{
if:date_access_granted_is_after=123456789}}
- work on courses and restricted pages that belong to a course
- use https://timestampgenerator.com/ or equivalent to generate timestamp
- {{ if:expiry_of_course_is_before=course-slug:123456789}} and {{
if:expiry_of_course_is_after=course-slug:123456789}}
- work on courses and restricted pages that belong to a course
- you can omit the course slug to test against just the current course (e.g. {{ if:expiry_of_course_is_before=123456789}}
- use https://timestampgenerator.com/ or equivalent to generate timestamp
- {{ if:false}} hides content contained within
- {{ if:logged_in}} and {{ if:logged_out}}
- {{ if:mobile}} and for desktop use {{ ifnot:mobile}}
- {{ if:physician=yes }} or {{ if:physician=no }} is based on user level of training and area of interest, returns "yes" if medical doctor above intern.
- {{ if:pricing_tier=3}} matches anyone in a pricing tier 3 country.
- {{ if:restricted_page_visited=1901}} evaluates if a user has visited the page 1901 and spent at least 30 seconds on the page with the tab being the active focus.
- {{ if:supporter=silver,radium}} matches anyone with a silver or radium supporter status
- {{ if:whitelist=yes}} matches anyone on the course access whitelist (inc all-access pass holders)
- {{ if:whitelist=expired}} matches anyone with expired whitelist
- {{ if:whitelist=indefinite}} matches anyone with indefinite whitelist access
Any of these tokens can be inverted using {{ ifnot: in place of {{ if.
Note: Failing to add an {{ endif}} after an {{ if}} will hide the remainder of the document.
Courses
- {{ current_course:title }}
- { date: whitelist_expires_on}} shows the date of expiry of the white list (AAP/free)
- there are a bunch of conditional statements relating to courses too: see above
The content of each course view can also be used to populate other course views. E.g.
you can copy the public content to the expired pages using {{ course_content:public }}
Availbale tokens:
- {{ course_content:public }}
- {{ course_content:restricted }}
- {{ course_content:expired }}
- {{ course_content:late_expired }}
- {{ course_content:all_access_pass_expired }}
Note: obviously, avoid recursive inclusions, or things will explode/give error.
Data protection
- Show California DP popup https://vetlucent.com/?snhbForceUser=CCPA
Dates
- available in: courses only (including certificate and course emails)
- confusingly, there are two separate systems for templating (one in the email section of courses and one for content) and therefore the variables have been implemented differently to match how they work
- course content
- {{ date:generated_on }} replaced with the date the page is rendered
- {{ date:access_expires_on }} renders the date the current users access to a course
will/did expire
- to add an integer of days to date: {{ date:access_expires_on+10 }}
- {{ date:accessed_on }} either the 'Certificate Availability' date or the date on which access was granted, whichever is later - note this will NOT work on restricted pages
- for conditional date of access and expiry see conditional tokens
- {{ date:whitelist_expires_on}} - shows the date that all-access pass or free access expires
- course email - without 'date:' in front of the token
- {{ generated_on }}
- {{ access_expires_on }}
- to add an integer of days to date: {{ access_expires_on|add_days:10 }}
- {{ accessed_on }}
-
Local Time
- available in: courses and restricted pages
- First parameter is the unix timestamp (number of seconds since midnight January 1st, 1970 UTC)
- Second parameter, if provided, is the date format string (see https://foragoodstrftime.com/ for examples)
- token: {{ local_time:1621224987:%A, %b %d}}
Direct Access Code
- token: {{ access_code }} inserts modal into public content section of course
- available in: courses only
- can grant access directly via url https://vetlucent.com/courses/[course title]?access-code=[insert code here]
Google forms
Google forms can be accessed from buttons and fields pre-populated with content. For
example the report a problem/feedback form can have the page title included as
predetermined text.
<a class="btn btn-primary"
href="https://docs.google.com/forms/d/e/1FAIpQLScTIdDt0qw9c6K0C9KwQLbbKzQUTVUo64cnwu5lXKvd8ESWKQ/viewform?usp=pp_url&entry.1880023792=Discospondylitis" style="margin: 2px; background: rgb(204, 204, 204);"
target="_blank">Report problem</a>
Alternatively tokens can be used to pull in specific values
<a class="btn btn-primary" href="https://docs.google.com/forms/d/e/1FAIpQLScTIdDt0qw9c6K0C9KwQLbbKzQUTVUo64cnwu5lXKvd8ESWKQ/viewform?usp=pp_url&entry.1880023792={{ current_restricted_page:title }}" style="margin: 2px; background: rgb(204, 204, 204);" target="_blank">Report problem</a>
Headerless articles and cases
- variable ?iframe=true
- append ?iframe=true to any url and it removes the header and background
- this is used in the iframe in quiz mode but third parties can also use this
Icons (font awesome)
Inserts "Solid" font-awesome icons with size based on font styling
- {{ font_awesome:icon_name, hexcolor }}
- icon_name is the name without the fa and with underscores (rather than hyphens)
- e.g. fa-check-to-slot needs to be written as check_to_slot in the token
- {{ font_awesome:circle_check,#76e46c }}
Images and icons
- icons for use in course email section only
- token: <img src="{{ &#39;image_name.png&#39;|image_asset_url}}"></img>
- note: just replace image_name.png e.g. <img src="{{ &#39;vetlucent-logo.png&#39;|image_asset_url}}"></img>from the list of available images (see images for course emails)
- hover to switch images - works only in pages whose URL is /courses
- use: upload both images - same size
- for examples visit this restricted page and copy source
-
IMPORTANT: be careful when adding this as there are unintended consequences
- once added to a page additional <p class="hoverswitch "></p> are often added which cause rendering issues (review source) - easiest to edit in HTML editor e.g. https://code.visualstudio.com/
Product
embed a purchase button or pricing table for courses
- token: {{ product:embed_token}}
- token: {{ pricing_table:embed_token,embed_token,embed_token}}
- available in: courses
- e.g. {{ pricing_table:nondoctor170,doctorhno320,doctorconsultant280 }}
- for free indefinite access (such as for Help Learning Pathways), use price = 0 cents and {{ product:embed_token}}- this will generate a purple button with the text of the button being the "Description" text
Profile links
- replace /users/[username]/ with /my/, and the link will prompt for user login and take the user to the their respective profile page including any filter applied
- e.g. https://vetlucent.com/users/radvet/playlists?page=1&system=central-nervous-system&visibility=unlisted would become https://vetlucent.com/my/playlists?page=1&system=central-nervous-system&visibility=unlisted
- Each user profile tab can be thus referred to:
- Profile: vetlucent.com/my/profile
- Cases: vetlucent.com/my/cases
- Playlists: vetlucent.com/my/playlists
- Edits: vetlucent.com/my/edits
- Favorites: vetlucent.com/my/favorites
- CE: vetlucent.com/my/ce
- Courses: vetlucent.com/my/courses
- Settings: vetlucent.com/my/settings
- vetlucent.com/my/settings#profile-information
- vetlucent.com/my/settings#institutions
- vetlucent.com/my/settings#biography
- vetlucent.com/my/settings#settings
- vetlucent.com/my/settings#communication-and-permissions
- vetlucent.com/my/settings#password
Question
- - embed a multiple-choice question
- token: {{ question:id}}
- works in pages, restricted pages, courses, articles and even cases, but there is little reason to use them in many of these locations.
Restricted pages
- {{ current_restricted_page:title }}
Restricted pages have a number of unique fields (at the bottom of the restricted page) that are available to them as tokens and conditional statements.
- {{ current_page:duration }} returns the duration in the Duration field in the Tags section as human readable. e.g. 00:34:24 will display as 34 minutes 24 seconds
- {{ current_page:duration_credits?round_to=0.25 }} converts duration to CE credits (or hours) rounded down e.g. 5 hours and 23 minutes will be shown as 5.25
- {{ current_page:duration_credits?multiplier=1.333334&round_to=0.25}}does the same as above, but first multiples the duration by a multiplier (for peer reviewer use 1.33333334 ).
- {{ if:current_page_tags=args_1,args_2 }} will match one or more tags. If multiple then treated as OR
- {{ current_page:users?tag= }} (replaced deprecated {{ current_page:authors }} )
- {{ if:users_page_tags_include=tag }} (replaced deprecated { if: author_of_this_page }} )
- {{ if:current_restricted_page=1234 }} matches if the page being viewed is /pages/1234
Citation data
- {{ current_page:citation_title}}
- {{ current_page:citation_publication_date}}
- {{ current_page:citation_author}}
- {{ current_page:citation_conference_title}}
- {{ current_page:doi}}
Tracking visits
When a logged in user visist a restricted page and stays on the page for >10s with the page being the focus of the browser it will be marked as visited.
Logic
- {{ if:restricted_page_visited=restricted page ID }}
- {{ ifnot:restricted_page_visited=restricted page ID }}
These can be used on the page itself or other pages and inclusions.
You use multiple page ID comma separated along with logic operators:
- {{ if:restricted_page_visited_OR=restricted page ID1, restricted page ID2, etc. }}
- {{ if:restricted_page_visited_AND=restricted page ID1, restricted page ID2, etc. }}
- {{ if:restricted_page_visited_NOR=restricted page ID1,restricted page ID2, etc. }}
- {{ if:restricted_page_visited_NAND=restricted page ID1, restricted page ID2, etc. }}
Note: if you don't include a logic operator, it will default to _OR (but I strongly suggest always including it).
Icon/bullet:
An icon-formatted version that changes from an open circle to a green tick can also be used for multiple items (e.g. pages in a learning pathway). The color can be optionally changed by the addition of an optional &color=#<hex> which will make both the circle and the tick the same color.
e.g.
Then some text and/or link.
Then some text and/or link.
Then some text and/or link.
CASE 1
CASE 2
CASE3
Multiple links or extra text or things just not working quite right?
The way this has been implemented each <li> item has exactly two child nodes (one of which contains the text and link). The result is that if you want the content after the tracking link to contain more than just one link and some text it needs to include a <span>.
This includes a full stop after a link, like this. (see that full stop? it will break things)
Generally, I think, Including <span> is going to be safer if you are doing anything fancy, but NOTE: if you copy-paste from the WYSIWYG page then the span will not always copy, so copy from source is best.
This one is correctly formatted
Some text and a link followed by another link
If you omit <span> it will break
- Some text and a link followed by another link
Sidebar
Restricted pages also have a sidebar that can include e.g.
Vimeo
- - is added using an iframe not a token
URL variables
- language preference: ?lang=gb or ?lang=us
- force user to login on way to URL: ?force_login=1
- 1 means "true" and will present user with blank name field
- force user to login on way to URL with name: ?force_login=[username]
e.g. ?force_login=frank
- this will prefill user name
- multiples variables can be concatenated with "&", e.g. /articles/meningioma?lang=us&force_login=1
User tokens
- These should work in most places
- {{ current_user:login }}
- {{ current_user:title }}
- {{ current_user:name }}
- {{ current_user:primary_area_of_interest }}
- {{ current_user:qualifications }}
- {{ current_user:country }}
- {{ current_user:city }}
- {{ current_user:training_level_title }}
Disclosures
Disclosures will render as dot points on the line below.
- {{ user_disclosures:<username>}}
- {{ user_disclosures:username?date=date/time stamp}}
- {{ current_user:disclosures}}
- {{ current_user:disclosures?date=date/time stamp}}
For example current user (i.e. you)
These are your disclosures: {{ current_user:disclosures}}
Youtube
This tag is available in articles as well as elsewhere.
- - embed a youtube video
- token: {{ youtube:youtubeID}}
- available in: articles, blog, courses, pretty much everywhere (?)
- limited to: Radiology Channel and Radiopaedia accounts
- note: must be public videos; for unlisted use Vimeo
- More info on courses creation here.
Images available
NOTE: I'm not sure we ever use these. This is a hardcoded list of files that can be used in course emails; new ones require code changes and a deploy.