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

Snippets and Variables

New Here ,
Jan 13, 2012 Jan 13, 2012

Copy link to clipboard

Copied

I'm asking this, even though I have a sneaking suspicion that the answer to my question is probably "no." But... doesn't hurt to ask, right?

My situation is this: I've got a feature in the software I'm documenting that shows up in two separate places. The features are 99% the same in these places, with subtle tweaks based on location and labeling. Now, I know that with snippets, I can re-use chunks of text in various topics, with the snippet acting as a single-source chunk of text that, when modified, will modify the topics in turn.

However, in the case I detailed above those subtle differences mean I can't use the exact same text in both places-- only 99% of it. It seems to me that I should be able to drop variables into my snippets; when I drop the snippets into my topics, I can then define the variables as I see fit. The "user defined variables" feature in RoboHelp isn't quite what I'm looking for; they seem to be more like smaller version of snippets.

So, is there a way for me to use snippets in multiple topics, but to adjust those snippets between topics? Or am I going to have to abandon the snippets dream entirely?

Views

772

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
Adobe Employee ,
Jan 14, 2012 Jan 14, 2012

Copy link to clipboard

Copied

Hi,

I think you should try to apply Conditional Built Tags on the Snippet or a part of it (See -http://help.adobe.com/en_US/robohelp/robohtml/WS363D975C-D8A8-4bec-A973-21CC7EC4FC9F.html) . You can Apply CBT to Snippet instance, generate different outputs for two places of the software. You can refine it further as per your need.

Thanks,

Anjaneai

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 ,
Jan 16, 2012 Jan 16, 2012

Copy link to clipboard

Copied

No good. The topics involved will be part of the same output, so unless there is a method under which you can generate topics using different conditional expressions in the same output, this won't work.

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 ,
Jan 16, 2012 Jan 16, 2012

Copy link to clipboard

Copied

Hi there

If I'm understanding this correctly, what you are looking for would be something along the lines of a "Topic" variable, no? For example, you want one snippet that is used in many places. But in Topic A, the snippet has a word or phrase that is unique. Topic B will use a different word or phrase while most of the snippet remains intact. Does this sound like I'm understanding the issue?

RoboHelp does offer a Variables functionality, but typically it's used on a "per project" basis. Meaning that any topic (or snippet) referencing a specific variable will always present the same variable. For example, Company Name. You could have several topics where the name of the company is inserted via a variable. That way, down the line when the name changes, you only change the variable and like topics using Snippets, anywhere the variable is used it presents the new value.

I'm thinking this actually *CAN* be achieved if you step a bit outside the bounds of RoboHelp and use JavaScript. Your snippet could be constructed so that where you want things to be different, a JavaScript variable populates the content. And each topic where you use the snippet would then have a specific place where you store the value for the variable.

Hopefully this helps... Rick

Helpful and Handy Links

RoboHelp Wish Form/Bug Reporting Form

Begin learning RoboHelp HTML 7, 8 or 9 within the day!

Adobe Certified RoboHelp HTML Training

SorcerStone Blog

RoboHelp eBooks

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 ,
Jan 16, 2012 Jan 16, 2012

Copy link to clipboard

Copied

LATEST

Ooh, interesting.

You've definitely got the problem summarized correctly. I don't have a tremendous amount of JavaScript knowledge stored up, but if this ends up being not too complicated, then... that might work.

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