Closed maneesha closed 5 months ago
@maneesha We did some testing on our end and the following code will allow you to set a site parameter, and output it:
{{< param "param_handle_here" >}}
This would be our recommended path for setting those number, rather than counting from the feed.
Thanks. Is there a way we can have live/dynamic stats? These numbers will change regularly.
Can you detail where the numbers would come from for each stat?
As noted above:
For example, the number of countries may be the number of unique countries in this feed. The number of workshops may be the length of the same feed. The number of members may be the length of this feed.
If it is difficult to do the counts in building the site, we could add a feed for counts and then the site would just have to pull that.
Oh I'm sorry I did not read that properly. But yes a feed for count would be the best way to go so we can build a shortcode which just pick the count set through a parameter.
So if you need a new count, you could update the feed on your site, and use the new parameter.
I added the label Needs Client Feedback as this will become actionable once the new feed is created.
As a prototype, can we use the n_trainers
and n_instructors
values from this feed?
@maneesha I've implemented a feed_value
shortcode. You can find it demonstrated on the module page here https://carpentries.netlify.app/modules/#feed-value. You can use int from within a the stat
shortcode as well as demonstrated here: https://carpentries.netlify.app/modules/#blobs
This all looks good.
When we use these bubbles with stats in them, we want to be able to dynamically generate these numbers. For example, the number of countries may be the number of unique countries in this feed. The number of workshops may be the length of the same feed. The number of members may be the length of this feed.
From what I can tell, this can be done in shortcodes which are then used in content pages, but not directly in content pages. Is this correct?