Page 1 of 1
Changing Conditional Tag name without breaking documents?
Posted: Thu Apr 13, 2023 9:30 am
by madcapuser48
Hi,
Looking to change my conditional tag from "AB Blueprint" to "XY Blueprint" (names are fictional for confidentiality).
In a test branch, when I change the tag in the Project Organizer under Conditional Text > Blueprint Tags, it removes the conditional tags from all of the content, leaving me with "missing" images and text throughout.
Is there a way to change the conditional tag and simultaneously update all the conditional tags, perhaps similar to how MadCap updates all the incoming links to an image when I change an image name?
Re: Changing Conditional Tag name without breaking documents?
Posted: Mon Apr 17, 2023 7:17 am
by ChoccieMuffin
You could do a two-step process.
Before you start, make a backup of your project.
1. In your condition tag set (I'm imagining it's called "Conditions"), change "ABBlueprint" to "XYBlueprint".
(I can't remember, but I think you can't have spaces in a condition, so I've changed your example slightly - I could be wrong so don't shoot me if I am.)
2. Do a search and replace in your project to change "Conditions.ABBlueprint" to "Conditions.XYBlueprint", searching in source code.
You might want to do this one at a time if you're nervous, or if you prefer, do a "Find All" and scroll through the list to see if it brings up anything odd.
I tested this and it should find topics and snippets, but also targets, and it might also find import files so you might need to think about whether you want to change them as well.
If you like, you can do two separate searches on specific file types - first Topics, then Snippets - then check what All Files brings up.
That should sort things for you. Let us know.

Re: Changing Conditional Tag name without breaking documents?
Posted: Mon May 08, 2023 11:58 am
by trent the thief
When I've needed to do that, I made the changes outside of Flare in a text editor with a "find/replace in files" function (I use TextPad) and ran it across all files.
In that editor, I can also open _all_ the files and the step through the hits one at a time.
And like ChoccieMufin said, make a backup before testing the fix.
Re: Changing Conditional Tag name without breaking documents?
Posted: Wed Sep 18, 2024 12:53 pm
by jimgilliam
Why did you use another editor's find/replace instead of Flare's?
Re: Changing Conditional Tag name without breaking documents?
Posted: Sun Dec 01, 2024 11:08 am
by trent the thief
jimgilliam wrote: Wed Sep 18, 2024 12:53 pm
Why did you use another editor's find/replace instead of Flare's?
Mainly because the editor is more powerful and much faster than Flare. I use NotePad++ most of the time, but often fall back on TextPad because of it has a typeahead text search in the editor. It also has sorting features without a plugins.