I'm a total newbie with Flare, so my apologies if this is all very basic!
Can I have a single HTML page with a long list of documents that are tagged with conditions, and let the users select which set (condition) of docs to view? I'm trying to avoid having a separate HTML page for each condition.
Showing different content from a single HTML page?
-
- Propeller Head
- Posts: 10
- Joined: Thu Aug 24, 2023 11:26 am
-
- Propellus Maximus
- Posts: 613
- Joined: Wed Feb 01, 2006 6:21 am
- Location: Off in the dark....
Re: Showing different content from a single HTML page?
Hi Elin,
Sorry, Flare isn't able to do that on it's own.
But depending on your goal there are other approaches. Homer Christensen did a flitering system in flare that could work for you. It's based on the glossary.
https://www.madcapsoftware.com/blog/cre ... -snippets/
Sorry, Flare isn't able to do that on it's own.
But depending on your goal there are other approaches. Homer Christensen did a flitering system in flare that could work for you. It's based on the glossary.
https://www.madcapsoftware.com/blog/cre ... -snippets/
Trent.
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation!
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation!
-
- Propeller Head
- Posts: 10
- Joined: Thu Aug 24, 2023 11:26 am
Re: Showing different content from a single HTML page?
Trent, I appreciate the link to the filtering system info. That looks like a great solution, but a bit advanced for me at the moment. Once we've migrated into Flare I'll have more time to play around with it. Thanks!
Re: Showing different content from a single HTML page?
In short, it's definitely possible, but Flare has nothing built-in that will handle dynamically showing/hiding content in the output.
The basic idea is that you mark/tag the content with something like a condition tag, or a class or ID - something that you can actually see in the HTML code in your output. (Conditions work here because you can see them in the HTML output as 'data-mc-conditions' attributes.)
Then you write some JavaScript that shows/hides the content that you've marked.
You also need to add a control, like a dropdown list or radio buttons, so the user can select what to display.
The idea has come up quite a few times in the forums, and this is one solution by Thomas Trenger that uses a version filter to show/hide content that's marked with condition tags.
http://tregner.com/flare-blog/version-f ... l5-output/
You can also take this a step further if you want to remember what the user has selected. You can do this in your script by saving their choice in the browser's local storage (a bit like using a cookie), and then retrieve their choice from local storage the next time they open your help, so it's automatically applied. If you know JavaScript or have access to a developer, this is quite an easy job.
The basic idea is that you mark/tag the content with something like a condition tag, or a class or ID - something that you can actually see in the HTML code in your output. (Conditions work here because you can see them in the HTML output as 'data-mc-conditions' attributes.)
Then you write some JavaScript that shows/hides the content that you've marked.
You also need to add a control, like a dropdown list or radio buttons, so the user can select what to display.
The idea has come up quite a few times in the forums, and this is one solution by Thomas Trenger that uses a version filter to show/hide content that's marked with condition tags.
http://tregner.com/flare-blog/version-f ... l5-output/
You can also take this a step further if you want to remember what the user has selected. You can do this in your script by saving their choice in the browser's local storage (a bit like using a cookie), and then retrieve their choice from local storage the next time they open your help, so it's automatically applied. If you know JavaScript or have access to a developer, this is quite an easy job.
-
- Propellus Maximus
- Posts: 613
- Joined: Wed Feb 01, 2006 6:21 am
- Location: Off in the dark....
Re: Showing different content from a single HTML page?
Great info. I've also been wishing MC would implement some conditional topic display logic.
Trent.
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation!
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation!