Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

add_to_collection_link()

Description

Generates a HTML link for adding a resource to a collection

Parameters

ColumnTypeDefaultDescription
$resource integer ID of resource
$search string "" Search parameters
$extracode string "" Additonal code to be run when link is selected
$size string "" Resource size if appropriate
$class string "" Class to be applied to link

Return

string

Location

include/collections_functions.php lines 2665 to 2671

Definition

 
function add_to_collection_link($resource,$search="",$extracode="",$size="",$class="")
    {
    global 
$lang;

    return 
"<a class=\"addToCollection " $class "\" href=\"#\" title=\"" $lang["addtocurrentcollection"] . "\" onClick=\"AddResourceToCollection(event,'" $resource "','" $size "');" $extracode " return false;\" data-resource-ref=\"{$resource}\">";

    }

This article was last updated 27th February 2021 21:05 Europe/London time based on the source file dated 26th February 2021 11:40 Europe/London time.