I'll also provide insights into how this site was made, as well as code examples and thoughts on how those could be further developed.
Feel free to leave questions or comments at the bottom of each post - I just ask people to create an account to filter out the spammers. You won't receive any unsolicited communication or find your email sold to a marketing list.
Efficient Cascading Choices in Wagtail Admin: A Smart Chooser Panel Solution
Learn how to implement this custom chooser panel, providing a one-click method to effortlessly manage cascading selections, enhancing your Wagtail experience.
Crafting a Bootstrap Navbar: How to Create Sticky Items for Persistent Visibility in Collapsed Mode
Creating Custom Django Form Widgets with Responsive Front-End Behaviour
Creating Wagtail Streamfield StructBlocks with a Customised Editor Interface
Importing Text From File Into a textarea HTML Form Field
We'll tie this together by creating a custom FieldPanel in Wagtail's CMS and add some CSS to tidy things up.
Wagtail: Extending the Draftail Editor Part 3 - Dynamic Text
I'll go through an example of adding inline Font Awesome icons as a proof of concept which could be easily adapted to show any dynamic information such as stock indices, exchange rates, availability of a resource etc..
Adding MapBox Blocks to Wagtail Stream Fields
Surprisingly, the safe way to do this requires far less coding and allows you to pass complex data structures without the faff and without exposing your site to unnecessary risk.
Here, I create an automated, on-the-fly table of contents without the need for hard-coded anchor links, regardless of the source of your content. It's easily adaptable to turn into a nav bar or similar menu. Similarly, this technique could be used to produce a summary with links on an API data feed page for rapid data analysis and drill-down capability.
At the end, I wrap it in a Wagtail stream block ready to drop into your templates.