Hyperlinks in Snippets

This forum is for all Flare issues not related to any of the other categories.
Post Reply
JasonSTI
Sr. Propeller Head
Posts: 112
Joined: Mon Jan 07, 2008 11:34 am

Hyperlinks in Snippets

Post by JasonSTI »

In our newest project, we have moved the majority of our content to snippets so that they can be reused in multiple topics and targets. However, we came across an interesting issue regarding hyperlinks.

Many snippets will have links to the topic where that subject is addressed. Occasionally, this snippet will itself be included in that topic as part of a longer explanation, so that we don't need to change text in multiple places. However, this causes the link to also be included, which isn't really desirable. I'm not able to find any option to exclude self-referencing links, nor does it change when using a xref instead of a href.

Does anyone have any suggestions on how to prevent self-referencing links without duplicating content?
ChoccieMuffin
Senior Propellus Maximus
Posts: 2650
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Hyperlinks in Snippets

Post by ChoccieMuffin »

Not an automatic solution so might not be practical if you have hundreds of instances, but you could try this.

In your snippet, you have something like "For details see xxx." (where xxx = the cross-ref stuff from Flare.) If you don't have one already, create a condition tag set exclusively for snippets, for the sake of argument call that set "Snippets", and create a condition in there and call it "Cross-ref".

In your snippet, apply Snippets.Cross-ref condition to the sentence "For details see xxx."

In the topic that includes your snippet, to the snippet exclude the snippet condition Snippets.Cross-ref if it happens to be referring to itself.

Can't think how you could do it automatically, but that might get you out of a hole.
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Post Reply