Snippet condition confusion

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Snippet condition confusion

Post by ChoccieMuffin »

I have a bit of a problem, and I don't know whether it's something I'm doing wrong, or whether I've just misunderstood how things are supposed to work.

I have some snippets that use nested snippets. Inside the inner snippet I have applied conditions to a couple of paragraphs.
In the snippet that includes the nested snippet I have other paragraphs with conditions on them - some the same as the conditions in the nested snippet.

When I include the outer snippet in a topic and then set the snippet conditions on the topic, the conditions work as I would expect.
When I set the snippet conditions on the outer snippet, inside the topic, the conditions on the inner snippet don't seem to work.

Have I done something wrong? As I understood it, you can apply snippet conditions to snippets inside topics because you might want to use different conditions on different snippets.

Views, folks?

EDIT: It works in the final output, but not in the XML Editor view. Grr!
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
ajturnersurrey
Sr. Propeller Head
Posts: 346
Joined: Fri Nov 05, 2010 3:30 am

Re: Snippet condition confusion

Post by ajturnersurrey »

There are a few gotchas with snippets, but what you describe should not be a problem.

A few days ago we spotted that conditions stop working inside long snippets:
viewtopic.php?f=75&t=28062
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Snippet condition confusion

Post by NorthEast »

ChoccieMuffin wrote:When I include the outer snippet in a topic and then set the snippet conditions on the topic, the conditions work as I would expect.
When I set the snippet conditions on the outer snippet, inside the topic, the conditions on the inner snippet don't seem to work.

EDIT: It works in the final output, but not in the XML Editor view. Grr!
Are you sure about that?

When I set a snippet condition on a snippet, it only applies to that snippet, and not any nested snippets inside it.

e.g.

I created two snippets, snippetA and snippetB.
I marked some text inside snippetB with condition conditionB.
I inserted snippetB inside snippetA.
I inserted snippetA inside a topic, and set the snippet conditions on snippetA to exclude conditionB.
When I build the output, the text using conditionB in the nested snippet is still displayed.
Yehuda
Jr. Propeller Head
Posts: 2
Joined: Mon Feb 16, 2015 3:31 am

Re: Snippet condition confusion

Post by Yehuda »

I'm experiencing the same problem as Dave is. Has anyone found a solution?
Post Reply