Add condition tags to imported topics based on heading style

This forum is for all Flare issues related to importing files or projects.
Post Reply
nlieurance
Jr. Propeller Head
Posts: 6
Joined: Fri Feb 24, 2017 11:02 am

Add condition tags to imported topics based on heading style

Post by nlieurance »

I'm importing a Word document and need to add condition tags to all of the topics that start with a particular heading style. Anyone know of a good way to automate this? I don't want to have to assign tags manually.
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Add condition tags to imported topics based on heading s

Post by Nita Beck »

I don't know of a way to do this upon import from Word. But I have a question: Will all these topics eventually reside in the same folder in the Content Explorer? If yes, you can apply the condition to the folder instead of all the individual topics.

And sorry, I forgot my manners. Welcome to the forums! :)
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
nlieurance
Jr. Propeller Head
Posts: 6
Joined: Fri Feb 24, 2017 11:02 am

Re: Add condition tags to imported topics based on heading s

Post by nlieurance »

Nita Beck wrote:I don't know of a way to do this upon import from Word. But I have a question: Will all these topics eventually reside in the same folder in the Content Explorer? If yes, you can apply the condition to the folder instead of all the individual topics.

And sorry, I forgot my manners. Welcome to the forums! :)
Thank you, Nita.

I have all topics from the import in the same folder, but only some of them will get the condition. There appear to be several good ways to add conditions to multiple topics at one time, but no good way to automatically add them on import.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Add condition tags to imported topics based on heading s

Post by ChoccieMuffin »

I would do a Search-and-Replace on the source code, either in Notepad++ or in Flare searching in the source code, inserting the appropriate condition in the heading. For example, search for <hn and change to <hn MadCap:conditions="Tags.XXX" where n is the heading number and the condition you want to apply is in condition tag set Tags and is called XXX. (I left off the closing > in case you have some headings that have other stuff in them, like classes and so on.

But only if you're happy playing inside the code - you can seriously break your project so make sure you create a backup before you do this kind of thing.
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
Psider
Propellus Maximus
Posts: 815
Joined: Wed Jul 06, 2011 1:32 am

Re: Add condition tags to imported topics based on heading s

Post by Psider »

ChoccieMuffin wrote:I would do a Search-and-Replace on the source code, either in Notepad++ or in Flare searching in the source code, inserting the appropriate condition in the heading. For example, search for <hn and change to <hn MadCap:conditions="Tags.XXX" where n is the heading number and the condition you want to apply is in condition tag set Tags and is called XXX. (I left off the closing > in case you have some headings that have other stuff in them, like classes and so on.

But only if you're happy playing inside the code - you can seriously break your project so make sure you create a backup before you do this kind of thing.

Hi ChoccieMuffin, won't that only tag the heading, rather than the topic as a whole? (I could totally be mis-remembering how Flare tagging works, however, and I don't currently have access.)
Post Reply