Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

render_new_featured_collection_cta()

Description

Render a blank tile used for call to actions (e.g: on featured collections, a tile for creating new collections)

Parameters

ColumnTypeDefaultDescription
$url string URL
$ctx array Rendering options determined by the outside context

Return

void

Location

include/render_functions.php lines 2793 to 2825

Definition

 
function render_new_featured_collection_cta(string $url, array $ctx)
    {
    if(
'' === $url)
        {
        return;
        }

    
$full_width = (isset($ctx["full_width"]) && $ctx["full_width"]);
    
$centralspaceload = (isset($ctx["centralspaceload"]) && $ctx["centralspaceload"]);
    
$html_h2_span_class = (isset($ctx["html_h2_span_class"]) && trim($ctx["html_h2_span_class"]) != "" trim($ctx["html_h2_span_class"]) : "fas fa-plus-circle");

    
$html_tile_class = array("FeaturedSimplePanel""HomePanel""DashTile""FeaturedSimpleTile""FeaturedCallToActionTile");
    
$html_contents_h2_class = array();

    if(
$full_width)
        {
        
$html_tile_class[] = "FullWidth";
        
$html_contents_h2_class[] = "MarginZeroAuto";
        }

    
$onclick_fn = ($centralspaceload "CentralSpaceLoad(this, true);" "ModalLoad(this, true, true);");
    
?>
    <div id="FeaturedSimpleTile" class=" echo implode(" "$html_tile_class); ?>">
        <a href=" echo $url?>" onclick="return  echo $onclick_fn?>">
            <div class="FeaturedSimpleTileContents">
                <div class="FeaturedSimpleTileText">
                    <h2 class=" echo implode(" "$html_contents_h2_class); ?>"><span class=" echo $html_h2_span_class?>"></span></h2>
                </div>
            </div>
        </a>
    </div>
    
    
}

This article was last updated 11th December 2024 20:35 Europe/London time based on the source file dated 11th December 2024 15:55 Europe/London time.