• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Easily embed js in all previously-existining topics

Guest
Jan 24, 2008 Jan 24, 2008

Copy link to clipboard

Copied

My company has put in place a system by which we can track hits to various help topics. So there is a js file on our server that does all the work. However, I need to add a line of script to each of the topics that references this file. Is there an easy way of doing this without going into the True Code for each individual topic? I looked into adding it into the header of the template used by the topics, but I think this might not work; within each individual topic, it is just referencing the template, so it would end up being a reference within a reference.

Any ideas? Thanks!

Views

238

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Jan 24, 2008 Jan 24, 2008
That's a good idea. I didn't think you could use Replace Em on entire folders and for only files with certain extensions. That will probably work. Thanks!

Votes

Translate

Translate
LEGEND ,
Jan 24, 2008 Jan 24, 2008

Copy link to clipboard

Copied

Hi CAcademy

Perhaps insert the code into a footer and apply the footer to all topics?

Just a thought... Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 24, 2008 Jan 24, 2008

Copy link to clipboard

Copied

Or do a multi-file find and replace (there are multiple threads in these forums that talk about tools). You would probably do something like this...

Find:

</head>

Replace with:

<script language="JavaScript" src="myfile.js"></script>
</head>

Basically, you'd need to find code that's already in every file and replace it with the code you want in every file. Just make sure you're keeping necessary code intact, hence including the </head> tag in the replacement code. Hope this helps,

Ben

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 24, 2008 Jan 24, 2008

Copy link to clipboard

Copied

That's a good idea. I didn't think you could use Replace Em on entire folders and for only files with certain extensions. That will probably work. Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 24, 2008 Jan 24, 2008

Copy link to clipboard

Copied

LATEST
That's a good idea. I didn't think you could use Replace Em on entire folders and for only files with certain extensions. That will probably work. Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp