Flare's logic in case of multiple conditions on same content

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
Joost
Propeller Head
Posts: 45
Joined: Wed Jan 02, 2008 1:32 am

Flare's logic in case of multiple conditions on same content

Post by Joost »

Hi,

I did some testing on multiple condition tags on the same content and I am puzzled by the logic.

Suppose I have two conditions (condition 1 and condition 2) and the classic printonly and onlineonly conditions. Suppose I always exclude condition 2.

I include condition 1, I include screenonly and I exclude printonly in the online target. This is what I get:
- Text with condition 1 is displayed, except for printonly, which is ok.
- Text for condition 2 however, is displayed for the ones that also have the screenonly tag.

This is not what I want. Everyting with condition 2 should be excluded because the condition 2 is excluded. If I go into the Target designer, I see only OR statements on the Conditions tab, no AND statements. Is this a bug or is this designed this way? Or am I missing anything?

And how should I solve my problem?

All help appreciated,

Joost
royj
Propeller Head
Posts: 71
Joined: Mon Feb 13, 2006 1:19 pm
Location: Fargo, ND
Contact:

Re: Flare's logic in case of multiple conditions on same content

Post by royj »

Joost,
I discovered the same thing: Overlapping conditions doesn't do what you want it to. I ended up creating things like:
  • Condition1_PrintOnly
  • Condition1_ScreenOnly
  • Condition2_PrintOnly
  • Condition2_ScreenOnly
But that gets ugly as you add more conditions, and I'm trying to avoid it as much as possible. Unfortunately, I don't know of a better work-around.
Roy Jacobsen
Writing, Clear and Simple
Fargo, ND
royj@writingclearandsimple.com
http://rmjacobsen.squarespace.com
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Flare's logic in case of multiple conditions on same content

Post by RamonS »

By design, an include overrides any exclude and no tagging is interpreted as include. Sure, could have been done the other way around, but it would just create other problems.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Flare's logic in case of multiple conditions on same content

Post by KevinDAmery »

RamonS wrote:By design, an include overrides any exclude and no tagging is interpreted as include. Sure, could have been done the other way around, but it would just create other problems.
To put it another way, in Flare the only purpose of an explicit Include condition is to over-ride an Exclude condition.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Flare's logic in case of multiple conditions on same content

Post by RamonS »

Nicely put!
Judith
Propeller Head
Posts: 43
Joined: Wed Jan 21, 2009 8:28 am
Location: Ashtead, Surrey, UK

Re: Flare's logic in case of multiple conditions on same content

Post by Judith »

One useful technique is to group topics together in a folder and apply an exclude condition at folder level and an include condition at topic level.

It's a handy way of building a specific target that has a relatively small number of topics from the project.
Paul Griffiths
Sr. Propeller Head
Posts: 261
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK

Re: Flare's logic in case of multiple conditions on same content

Post by Paul Griffiths »

As others have pointed out, if Condition_A and Condition_B are both applied to the same content, then whichever is included always "wins".

There is a sort of a workaround, but it's useful only if, for a particular piece of content, you know for sure that (a) you're going to specify both conditions and (b) you always want Condition_A to override Condition_B.

In other words, you are sure that even if Condition_B is included, if Condition_A says it's excluded, then it's out!

The trick is in the words "applied to the same content" above.

Suppose it's a paragraph. You apply Condition_A to the <p> tag. Then you put a <span> tag around all the content in the paragraph. Apply Condition_B to the <span>, but with an exclude action of "Unbind".

A quick test confirms that this seems to work, at least in the simple case described above.
Post Reply