Conditional Text

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Greg
Sr. Propeller Head
Posts: 130
Joined: Thu Mar 29, 2012 12:01 am

Conditional Text

Post by Greg »

Is there a way to apply a conditional text to a style?

For example, if I don't want any images in a version of online help and I want to get rid of all figure captions in one click.

Thanks
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Conditional Text

Post by Nita Beck »

As of Flare 12, yes, one can apply a condition to a style. It's covered in the Flare Help system.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Matze
Sr. Propeller Head
Posts: 166
Joined: Mon Jun 20, 2016 10:35 pm

Re: Conditional Text

Post by Matze »

Hi Nita,

I´m using Flare 11, is for THIS version any way to apply a condition to a style?

After looking in the web, I´ve found some ideas to write it directly in the styles.css,
but it does not work so far:

For my tasks I´ve a condition at the beginning and a result at the end,
maybe I try to use it in the screen output only ... Therefore my new entry "data-mc-conditions: ScreenOnly; "
should show it in the ScreenOnly condition only.

---
p.Task_Result
{
mc-leader-indent: 5pt;
margin-right: 0px;
background-repeat: no-repeat;
min-height: 35px;
background-position: left middle;
text-align: left;
text-indent: 0px;
margin-top: 0pt;
data-mc-conditions: ScreenOnly;
font-family: Sennheiser-Book;
height: 0;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
padding-bottom: 0px;
mc-auto-number-format: '{color: 0092d0}{b}Result: {/b}{/color}';
}
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Conditional Text

Post by Nita Beck »

Matze wrote:I´m using Flare 11, is for THIS version any way to apply a condition to a style?
Sorry, but to the best of my knowledge, no. The ability to apply a condition to a style was new functionality added in Flare 12. Unless someone else can suggest something, I think you are not going to get Flare 11 to apply a condition to a style.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Conditional Text

Post by ChoccieMuffin »

I second what Nita says. Just not possible before Flare 12, so you have to apply the style, and then apply the condition separately. I use the Conditions keyboard shortcut Ctrl+Shift+C LOADS, and it makes it not too painful to do. From Flare 12, if you have a condition included in a style, it does the same thing in the code of your document, but automatically.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Paulie
Sr. Propeller Head
Posts: 140
Joined: Sun Mar 01, 2015 3:01 pm

Re: Conditional Text

Post by Paulie »

Hi there,

If you have to stay with Flare 11, then one option might be to make a new medium for the outputs where you do not want the images (and other content) to display, and apply that medium to the required targets. You can then use CSS to hide the elements:

Code: Select all

img {
display:none;
}
Note: The above will hide all images, so if you want to selectively hide images you would need to create a 'display/do not display' class, and then apply that class to the images that you want to include/exclude.

Code: Select all

img.DoNotDisplay {
display:none;
}
You should be able to do something similar with most elements.
"In an ideal world, software should be simple, well designed, and completely intuitive to end users. In the real world, good documentation is king."
KayJay
Propeller Head
Posts: 23
Joined: Tue Nov 29, 2016 7:19 am

Re: Conditional Text

Post by KayJay »

Hi all,
I'd like to apply a condition to a style but I'm having trouble finding how to do this in the Madcap Documentation, as opposed to applying a style to a condition.
Can someone point me to the article?

Thanks!
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Conditional Text

Post by NorthEast »

KayJay wrote:Hi all,
I'd like to apply a condition to a style but I'm having trouble finding how to do this in the Madcap Documentation, as opposed to applying a style to a condition.
Can someone point me to the article?

Thanks!
See:
https://help.madcapsoftware.com/flare20 ... conditions
KayJay
Propeller Head
Posts: 23
Joined: Tue Nov 29, 2016 7:19 am

Re: Conditional Text

Post by KayJay »

Perfect, thank you for the link!
Post Reply