Searching for Conditional Tags in a Project

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Vernholio
Propeller Head
Posts: 12
Joined: Thu Jul 11, 2013 12:01 pm

Searching for Conditional Tags in a Project

Post by Vernholio »

Hi All,

I needed to add a new Condition Tag to a project, and I noticed that I was "running out of colors" -- I want to be able to visually distinguish all of my Condition Tags, and with all of the tags I currently have, I'd have to use, for example, light green and dark green. And, it can be a little difficult to separate similar tag colors in Flare sometimes. Looking at my existing tags, I noticed a couple I don't use, and figured I could just replace one of them with my new tag. Then it hit me, am I 100% sure I don't use that tag? To my question... How do I go about searching a project to find each instance of a Condition Tag?

Thanks in advance for any suggestions/help!

- Vern
Vernholio
Propeller Head
Posts: 12
Joined: Thu Jul 11, 2013 12:01 pm

Re: Searching for Conditional Tags in a Project

Post by Vernholio »

OK… It seems I just answered my own question: You can search the source code. I’m working in Flare 10, and this is what I did:
  1. Go to any page in your project.
  • Add a new line of text and highlight it (or highlight an existing line of text).
  • Set it to the desired Condition.
  • Set the view to Text Editor (vs. XML Editor – little tabs at the bottom of the Topic pane)
  • Locate the line on which you just set the Condition Tag. You’ll notice that that it’s been prefaced with <p MadCap:conditions=”<condition name>”>. Highlight and copy the MadCap:conditions=”<condition name>” segment.
  • Access the “Find and Replace in Files” interface (Home > Find and Replace in Files).
  • Paste content in the Find: field.
  • Select (whole project) from the Find in: drop-down.
  • Select Find in source code.
  • Click Find Next to find the first instance.
  • From here, you can manually delete the MapCap:Conditions=”<condition name>”, in order to remove the Condition setting.
  • Repeat Steps 10 - 11 to continue.
The only flaw I’ve found with this process is that the Text Editor / XML Editor tab selections seem to randomly disappear when performing the search. So, you can’t access the XML view, in order to see how/where the Condition is applied. Rather than manually deleting the MadCap:Conditions... content from the Text view, I suppose you could continue the search and just make note of each topic title in its tab. Then, you could manually access them later to see how the Condition is applied.

Hope this helps others!

- Vern
SteveS
Senior Propellus Maximus
Posts: 2090
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Searching for Conditional Tags in a Project

Post by SteveS »

If you have Analyzer it has a report for used condition tags...
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: Searching for Conditional Tags in a Project

Post by kwag_myers »

Another option to Vern's is to use Search & Replace Master, which is freeware. I started using this tool because I didn't care for previous versions of Flare's S&R feature.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
rob hollinger
Propellus Maximus
Posts: 661
Joined: Mon Mar 17, 2008 8:40 am

Re: Searching for Conditional Tags in a Project

Post by rob hollinger »

Always create a back up of your project prior to doing any kind of global find and replace.

This is easily done using the Project ribbon > Zip Project.
This will create a zipped copy of your project that can be put in a safe place just in case something goes wrong with the find and replace.
Rob Hollinger
MadCap Software
Post Reply