Include Images in Protocol Help Text

An image is worth a thousand words, and sometimes it would be helpful for explaining a complex protocol to a perspective user.  The Web Portal displays the protocol help when the user clicks on a protocol.  Wouldn't it be nice if that help could include figures?

The help text for a protocol allows the addition of HTML tags, including the tag, but where to best host those images?

Ideally we would like to store the files in the server's Public directory, and serve them up with the existing Apache web server.

Thoughts?
Answers 3
CS
CS 2016-03-01 Best Answer
Hi Kip,

You can host images and other web content in a subfolder of 

/web/apps

On the server filesystem.

For example, I have a subfolder 

/web/apps/subdir

Folders under the web/apps folders map to URLs like this:

http://:/webapps/subdir

Note the lack of a slash between "web" and "apps" in the URL.

You can then add the filename to the end of this URL and use that on the src attribute of the img tag in your help text.  I tried this on my own server and it worked nicely.

Hope that helps,

Craig
KS
KS 2016-03-01
Thank you Craig.  This gets me something I can work with.

The search term 'webapps' identifies the appropriate section in the Deployment Guide.

Among other things it states, "while webapps is a convenient alias, it is hard coded... You can create a corporate-specific alias to point to an alternate location." 

I have not found a description of how to create this alias, but my suspicion is that it is based on using the keyword in a package.conf file.  Is this correct?
SV
SV 2016-03-02
Hi Kip,

I have another suggestion, it may fit what you want to achieve. That would be to convert your image into a base64 string and copy the string in a html tag. For example, the R Box Plot component attached has an image in the help of Box and Symbol Options/Symbol Type.

1. Generate your image into a base64 string with the Logo Base64 Converter protocol attached (Done by Pedro Gomez-Fabre a long time ago, thanks!). You just have to change the protocol-level parameter file to match the location of your file, run the protocol, and copy the base64 string. BTW it will convert all images in the same folder if you use the * wildcard.

2. Edit the parameter help adding the following tag
.

The issue is that a base64 string can be quite long and the image itself will be make the protocol heavier. But if it's a small image as for illustration purpose in my example, it works fine.

Let me know how that works.
comment imagecomment image