I’m looking for a solution to the following problem.
My Webflow site (leonardoenglish.com) uses MS to allow members access to transcripts and key vocabulary for podcasts for English learners.
So far so good - all implemented at a basic level.
However, I’ve recently implemented some custom JS to ‘animate’ the transcripts (see here: https://www.leonardoenglish.com/podcasts/how-to-use-podcasts-to-learn-english-like-a-boss) using an external script.
Each podcast can either be:
- Free transcript (anyone can access it, no membership required)
- Pro transcript (membership is required)
The solution I’m using at the moment is as follows:
- ‘Pro’ content div is hidden to non-pro members, but the script still runs (it adds content to a hidden div). When a non-pro member sees pro content, they get a message telling them to upgrade.
- ‘Free’ content div - is hidden when marked as ‘Pro’, but the script still runs, again to a hidden div
Inelegant, I know.
With this external script, I’m trying to find a solution to do the following:
<script> If is a valid MS member ( Run script as normal ) If isn’t a member ( If podcast CMS attribute is ‘free’ ( Run script as normal ) Else ( Run a different script ) </script>
However, I can’t see how you would access whether the CMS attribute of the podcast is ‘free’ (appreciate this is probably more a webflow question than MS).
And if this isn’t possible, would you just have to have 2 separate custom code snippets in webflow, one of which is hidden when free, the other shown when free?
Wondering if anyone has come up against a similar problem….