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

Add code to all Topics in one go

New Here ,
Jul 26, 2011 Jul 26, 2011

Copy link to clipboard

Copied

Hello,

I've been trying to figure this out but I just don't understand why this is happening. I'm using sed (in cygwin) to append a javascript and iframe to topics but following the sed all topics become forbidden.  It must be with how I did sed so I just wanted to find out:

if there is a way to modify the masterpage with some constant content and it will roll out to all child topics. I am trying to add an iframe and javascript to all topics. The code will be exactly the same for all topics (i've created a dynamic page that will display content base on the parent page). Would I use placeholder? Adobe scripting?

Views

499

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

LEGEND , Jul 27, 2011 Jul 27, 2011

Hi,

You can use masterpages. Add the code you want in the header or footer of the masterpage. All topics associated with the masterpage will get that code. That means that the iframe is positioned above or below the topic content.

If you want it somewhere else, you probably want to add the code after you generated the output. You can use any Find/Replace tool for that, or create a script in RoboHelp to do that for you.

Greet,

Willam

Votes

Translate

Translate
LEGEND ,
Jul 27, 2011 Jul 27, 2011

Copy link to clipboard

Copied

Hi,

You can use masterpages. Add the code you want in the header or footer of the masterpage. All topics associated with the masterpage will get that code. That means that the iframe is positioned above or below the topic content.

If you want it somewhere else, you probably want to add the code after you generated the output. You can use any Find/Replace tool for that, or create a script in RoboHelp to do that for you.

Greet,

Willam

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
New Here ,
Jul 27, 2011 Jul 27, 2011

Copy link to clipboard

Copied

The header works fine, but I would prefer it if I can put in the body. The Find replace tool doesn't allow for multiple line replacement. I'm new to Adobe scripting so I jsut wnted to find out how you can access all topics and search through them for a pattern.

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
LEGEND ,
Jul 28, 2011 Jul 28, 2011

Copy link to clipboard

Copied

Hi,

The Find replace tool doesn't allow for multiple line replacement.

You can use a third-party tool for that. FAR is quite popular. See http://helpware.net/FAR/

See http://www.adobe.com/devnet/robohelp/articles/robohelp-extendscript.html for an introduction to scripting with RoboHelp.

The following script may be a good example script: http://www.wvanweelden.eu/robohelp/scripts/ierendertags


Be sure to check out the standard script provided by Adobe. Please post back if you have any questions.

Greet,

Willam

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
New Here ,
Aug 01, 2011 Aug 01, 2011

Copy link to clipboard

Copied

LATEST

I simply added a JavaScript code to the header that inserts my html code following a document.getelementbytagname. It works nicely implementing a header to body injection.

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