Nested snippets with conditions - is there a bug?

This forum is for Single-Sourcing your Flare content to multiple outputs.

Nested snippets with conditions - is there a bug?

Postby ChoccieMuffin on Fri Aug 11, 2017 1:23 pm

I can't remember clearly, but I seem to remember someone mentioning that if you have a snippet that contains conditions, include that snippet inside another snippet, and then apply conditions to the OUTER snippet, that the conditions don't "stick".

I have a set of conditions and in one set I have PrintOnly and ScreenOnly, and in the other set I have products, e.g. ProductA, ProductB and ProductC.

My INNER snippet is used in quite a few places, and has the following conditions: ProductA PrintOnly, ProductB ScreenOnly, ProductB PrintOnly, ProductB ScreenOnly, ProductC PrintOnly, ProductC ScreenOnly.

I added the inner snippet to the OUTER snippet and didn't apply any snippet conditions there, as the OUTER snippet is used in a few places too.

When I added the outer snippet to a topic for use in Product C, I applied snippet conditions to it to Include ProductC and exclude ProductA and ProductB. Then when generating my Print and Screen outputs I put the PrintOnly and ScreenOnly conditions on the target.

As I see it, if I'm generating a Screen target for ProductC I should be able to apply Include ScreenOnly and Exclude PrintOnly and it should work. Just to make certain I applied advanced snippet conditions to also exclude ProdB and Print, Prod B and Screen, Prod A and Print and Prod A and Screen. But for some reason all three ScreenOnly bits from the inner snippet are included in the output.

Any suggestions? Is this a bug, or have I made things too complicated and missed something?

Update: I converted the inner snippet to text in the outer snippet and that resolved the problem, so that seems to confirm that conditions applied to an outer snippet don't affect an inner snippet. Meh, not happy with that, so I'll just have to report it.
Started as a newbie with Flare 6.1, now using Flare 2017.
Report bugs at
Request features at ... quest.aspx
Propellus Maximus
Posts: 1460
Joined: Wed Apr 14, 2010 8:01 am

Re: Nested snippets with conditions - is there a bug?

Postby devjoe on Wed Aug 16, 2017 11:53 am

Includes override excludes. If you include something, it will always go in even if there are excluded conditions on it. Most of the time you do not want to use includes, and only want excludes.
Sr. Propeller Head
Posts: 154
Joined: Thu Jan 23, 2014 1:43 pm

Return to Single-Sourcing

Who is online

Users browsing this forum: No registered users and 1 guest