Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource 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 2572 to 2607

Definition

 
function render_new_featured_collection_cta(string $url, array $ctx)
    {
    global 
$collection_allow_creation;

    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>
    
    
return;
    }

This article was last updated 21st April 2021 17:35 Europe/London time based on the source file dated 15th April 2021 09:35 Europe/London time.