Hi. I've been asked to produce two branded versions of my HTML output. Essentially we have two company names: eg Company A and Company B. I need to produce the same output for both companies but just with their own branded names. The problem I have is that there are about 500 topics already written which refer to Company A, some of them have 10 or more occurences of the name. I've created a variable but I now have to add this to all the instances of Company A so that when I change the variable name it changes all the instances of the company name.
Is there anyway of doing a global find and replace to replace all instances of Company A with a variable in one go?
Thanks Jonathan Wells
Variables
Re: Variables
Yes. Use Flare's find-and-replace with "Find in source code" enabled. Search on Company A and replace with <MadCap:variable name="Variables.Company" />, where "Variables" is the name of your variable set (i.e., the name as it appears in the Project Organizer pane) and "Company" is the name of the variable in that variable set to be used. IMPORTANT: Make sure you make a backup of the project before doing this, in case you inadvertently type something wrong.
It's recommended that the default value for the Company variable, for example, be set to an obvious generic value (e.g., CompanyName). Then in the target file for Company A, you change the default value of CompanyName to Company A. In the target file for Company B, you change the default value of CompanyName to Company B. The idea is that if you later add a Company C target and forget to change the variable in that target, then you'll see CompanyName in the output, which should remind you that you forgot to change the variable in the target.
It's recommended that the default value for the Company variable, for example, be set to an obvious generic value (e.g., CompanyName). Then in the target file for Company A, you change the default value of CompanyName to Company A. In the target file for Company B, you change the default value of CompanyName to Company B. The idea is that if you later add a Company C target and forget to change the variable in that target, then you'll see CompanyName in the output, which should remind you that you forgot to change the variable in the target.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
- Propeller Head
- Posts: 38
- Joined: Fri Sep 24, 2010 1:54 am
Re: Variables
Fantastic, thanks Lisa.