Publish variables which can be used for conditional display
Now I would like to have more granular control of displayed elements (e.g. <li> or <tr> elements) depending on group membership. I assume that this would be possible with a bit more knowledge about the data/variables available to scripts in Wild Apricot. Presumably these are already documented for the use of WA-internal developers. Why not publish (at least some of) it for us?
Roger Brooks commented
@Jay, sorry for the delayed response. I used CSS in a Custom HTML block. Here is an example:
<!-- Display instruction for discount if user is not logged in and current date is Jul.- Dec. -->
<p class=use_discount><strong>At the bottom of the *second* page of this application, please enter the code "2HY" (without the quotes) in the box labelled "Enter discount code" when joining in the second half-year (Jul.-Dec.) to profit from a 50% discount.</strong></p> The box labelled "Code" on the *first* page of the membership application is for entry of the CAPTCHA code displayed below it.
$('.use_discount').css("display",((bonaPage_IsUserAnonymous && getMonth() >5) ? "block":"none"));
Elijah Peterson commented
Yeah. That is why we have more specific control of the displayed elements. https://atlanticsigncompany.com/cincinnati-channel-letter-signs/
goalken highlight commented
Your article is very useful, the content is great, I have read a lot of articles, but for your article, it left me a deep impression, thank you for sharing. https://happywheels8.com
Chris Detro commented
In particular, I'd like to be able to embed additional members-only content on any given page, rather than having completely separate pages. For example, on an page about an event, only registered members see the embedded video recording.