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

render_browse_bar()

Description

Renders the browse bar

Parameters

This function accepts no parameters.

Return

void

Location

include/render_functions.php lines 3298 to 3349

Definition

 
function render_browse_bar()
    {
    global 
$lang$browse_bar_workflow$enable_themes;
    
$bb_html '<div id="BrowseBarContainer" style="display:none;">';
    
$bb_html .= '<div id="BrowseBar" class="BrowseBar">';
    
$bb_html .= '<div id="BrowseBarContent" >'
    
    
//Browse row template
    // script will replace %BROWSE_TYPE%, %BROWSE_EXPAND_CLASS%, %BROWSE_CLASS% %BROWSE_LEVEL%, %BROWSE_EXPAND%, %BROWSE_NAME%, %BROWSE_TEXT%, %BROWSE_ID%
    
$bb_html .= "
            <div id='BrowseBarTemplate' style='display: none;'>
            <div class='BrowseBarItem BrowseRowOuter %BROWSE_DROP%' data-browse-id='%BROWSE_ID%' data-browse-parent='%BROWSE_PARENT%'  data-browse-loaded='0' data-browse-status='closed' data-browse-level='%BROWSE_LEVEL%' style='display: none;'>
                <div class='BrowseRowInner' >
                    %BROWSE_INDENT%
                    %BROWSE_EXPAND%
                    %BROWSE_TEXT%
                    %BROWSE_REFRESH%
                </div><!-- End of BrowseRowInner -->
            </div><!-- End of BrowseRowOuter -->
            </div><!-- End of BrowseBarTemplate -->
            "
;

    
// Add root elements
    
$bb_html .= generate_browse_bar_item("R"$lang['browse_by_tag']);
    if(
$enable_themes)
        {
        
$bb_html .= generate_browse_bar_item("FC"$lang["themes"]);
        }
    if(!
checkperm('b'))
        {
        
$bb_html .= generate_browse_bar_item("C"$lang["mycollections"]);
        }
        
    if(
$browse_bar_workflow)
        {
        
$bb_html .= generate_browse_bar_item("WF"$lang['browse_by_workflow_state']);
        }

    
$bb_html .= '</div><!-- End of BrowseBarContent -->
                </div><!-- End of BrowseBar -->
                </div><!-- End of BrowseBarContainer -->'
;
    echo 
$bb_html;
    
    echo 
'<script>
        b_loading = new Array();
        // Expand tree to previous state based on stored cookie
        jQuery(document).ready(function()
            {
            ReloadBrowseBar();
            });
        </script>'
;
    }

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