function linkText = getOtherNamesLink(hp, topic, linkTopic, linkID, linkFcn)
    shouldPrintFullList = ~hp.commandIsHelp || ~hp.wantHyperlinks;
    
    linkText = getString(message(linkID', topic));
    
    if ~shouldPrintFullList
        linkText = helpUtils.createMatlabLink(linkFcn, linkTopic, linkText);
    end
    
    linkText = helpUtils.formatHelpTextLine(linkText);
    
    if shouldPrintFullList
        linkText = append(linkText, newline, feval(linkFcn, linkTopic, hp.wantHyperlinks, hp.command));
    end
end
