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

GetThemesFromRequest()

Description

Get a themes array

Parameters

ColumnTypeDefaultDescription
$levels int Number of levels to parse from request

Return

array Array containing names of themes matching the syntax used in the collection table i.e. theme, theme2, theme3

Location

include/collections_functions.php lines 4633 to 4652

Definition

 
function GetThemesFromRequest($levels)
    {
    
$themes = array();
    for(
$n 0$n <= $levels$n++)
        {
        
$themeindex = ($n == "" $n);
        
$themename getval("theme$themeindex","");
        if(
$themename != "")
            {
            
$themes[] = $themename;
            }
        
// Legacy inconsistency when naming themes params. Sometimes the root theme was also named theme1. We check if theme 
        // is found, but if not, we just go to theme1 rather than break.
        
elseif(!($themeindex == && $themename == ""))
            {
            break;    
            }
        }           
    return 
$themes;
    }

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