Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 2763 to 2795

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 19th March 2024 07:05 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.