What are the condition tag precedence rules?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
David Milkes
Jr. Propeller Head
Posts: 7
Joined: Wed Jun 11, 2008 6:53 am

What are the condition tag precedence rules?

Post by David Milkes »

Image

I am compiling a target that incudes the orange condition and excludes the blue condition. However, the compiler is including the files in the blue folder. I would imagine that Flare would exclude content if it is deeper than the included content. But what exactly are the rules of precedence/inheritance/whatever the term is?
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: What are the condition tag precedence rules?

Post by NorthEast »

If you don't tick the Include setting for the orange condition then it'll work.
Everything is included by default, so think of the Include setting as an override for anything that would otherwise be excluded.

In fact, you don't need to apply that orange condition tag on the folder in the first place, unless you want to exclude it in a different target.


Flares help-
By default, all tags will be included in the target unless you specify otherwise. If you want to exclude a condition tag from the output for this target, click the Exclude check box next to it. If you want to make sure a condition tag is included in the output for this target, click the Include check box next to it.

Why is there an Include check box if all tags are included by default? The Include check box is necessary in case you have two or more tags associated with the same content and there is a conflict.

example

Suppose you have two condition tags in your project—one called "Beginner" and another called "Advanced." Let's say that you have a topic containing three paragraphs. You apply the "Advanced" tag to the first two paragraphs, and you apply the "Beginner" tag to the last two paragraphs.

You have created a target called "Advanced Set Up." For this target, you obviously want to include all content associated with the "Advanced" tag, but you want to exclude content associated with the "Beginner" tag.

By default, Flare will include content associated with both tags, unless you tell it not to. So you tell Flare to exclude the content associated with the "Beginner" tag. The problem is the middle paragraph from the topic mentioned above. It is associated with both tags. You have told Flare to exclude content associated with the "Beginner" tag, and it will do so, overriding the default. But you want to make sure that paragraph is included in the "Advanced Set Up" output. That is why you need to make sure you select the Include check box next to the "Advanced" tag.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: What are the condition tag precedence rules?

Post by KevinDAmery »

Conditional precedence isn't based on hierarchy level in the folder structure. The same conditions can be used inside your topic code, so hierarchical level isn't a reliable way to handle it.

The rules are:
1. Everything in the Content folder is included by default.
2. If an Exclude is explicitly applied by conditions, the Exclude takes precedence over the default behaviour.
3. If an Include is explicitly applied by conditions, the Include takes precedence over any Excludes.

Basically, in Flare, the only purpose of an Include condition is to over-ride an Exclude condition. So in any case where there is both an Include and an Exclude, the Include wins.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
Post Reply