Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

render_help_link()

Description

Generates a help icon that opens the relevant Knowledge Base article in a modal

These links can be disabled by setting $contextual_help_links=false;

Parameters

ColumnTypeDefaultDescription
$page string '' Knowledge Base article to display, leave blank to show the Knowledge Base homepage
$return_string boolean false Set to true to return the html as a single line string, False will cause the function to echo the html

Return

mixed if $return_string=true return is string, else void

Location

include/render_functions.php lines 3384 to 3404

Definition

 
function render_help_link($page='',$return_string=false)
    {
    global 
$contextual_help_links,$pagename,$lang,$help_modal,$baseurl;
    if (
$contextual_help_links === false){return;}

    
// Build html for link into a string
    
$help_link_html  =      '<a ';
    
$help_link_html .=          'href="' $baseurl '/pages/help.php?page=' $page '" ';
    
$help_link_html .=          'title="' $lang["help-tooltip"] . '" ';
    
$help_link_html .=          'class="HelpLink" ';
    if (
$help_modal
        { 
$help_link_html .=    'onClick="return ModalLoad(this, true);" ';}
    else
        { 
$help_link_html .=    'target="_blank" ';}
    
$help_link_html .=      '>';
    
$help_link_html .=      '<i aria-hidden="true" class="fa fa-fw fa-question-circle"></i>';
    
$help_link_html .=      '</a>';

    if (
$return_string===false) {echo $help_link_html;}
    else {return 
$help_link_html;}
    }

This article was last updated 19th March 2024 06:05 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.