* @param bundleName e.g. "org.olat.core"
* @param pageName e.g. "my-page.html"
* @return
*/
public StringOutput contextHelpRelativeLink(String bundleName, String pageName, String linkText) {
StringOutput sb = new StringOutput(100);
if (ContextHelpModule.isContextHelpEnabled()) {
sb.append("<a href=\"");
if (bundleName == null) {
renderer.getUrlBuilder().buildURI(sb, new String[] { VelocityContainer.COMMAND_ID }, new String[] { pageName }, isIframePostEnabled? AJAXFlags.MODE_TOBGIFRAME : AJAXFlags.MODE_NORMAL);
} else {
renderer.getUrlBuilder().buildURI(sb, new String[] { VelocityContainer.COMMAND_ID, PARAM_CHELP_BUNDLE }, new String[] { pageName, bundleName }, isIframePostEnabled? AJAXFlags.MODE_TOBGIFRAME : AJAXFlags.MODE_NORMAL);
}
sb.append("\" ");
if(isIframePostEnabled) {
renderer.getUrlBuilder().appendTarget(sb);
}
sb.append(">");
sb.append(linkText);
sb.append("</a>");
}
return sb;
}