cPanel API 1 Functions - Branding::file

Description

This function searches for a file within a theme and returns its URL.

Warning:

cPanel API 1 is deprecatedDo not use this function. Instead, we strongly recommend that you use the following newer functions:
  • UAPI (recommended) — Branding::file 
    Error rendering macro 'excerpt-include' : No link could be created for 'UAPI Functions - Branding::file'.
  • cPanel API 2 — Branding::resolve_file 
    Error rendering macro 'excerpt-include' : No link could be created for 'cPanel API 2 Functions - Branding::resolve_file'.

Examples


 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
$branding_file $cpanel->api1('Branding''file'array('mythemes''/0''my_theme''1''0''0' '1') ); // Call the function.

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $branding_file $cpliveapi->api1('Branding', file, ['mythemes''/0''my_theme''1''0''0''1'] ); # Call the function.

 cPanel Tag System (deprecated)

<cpanel Module="Branding::file( $FORM( 'file','isvar','pkg','inline', 'needfile','skipdefault','checkmain') )">

 Output (URL)

 

/cPanel_magic_revision_1267840609/branding/contactinfo_include.html 

 

Parameters

 Parameter 

Type

Description

Possible values

Example

 file

 string

 Required

 The file's name.

 Any valid filename.

 /mytheme 

 isvar

 boolean 

 Required  

 This is a legacy parameter.

 

 

  • 0
  • null

 Warning:

 Always set this value to 0 or null.

 0

 pkg

 string

 Required  

 The style for which to search.

 Any valid style name.

 my_theme

 inline

 boolean

 Required  

 Whether to print the file's contents.

  • 1 — Print the file's contents.
  • 0 — Do not print the file's contents.

 1

 needfile

 boolean

 Required

 This is a legacy parameter.

 

  • 0
  • null

 Warning:

 Always set this value to 0 or null.

 0

 skipdefault

 boolean

 Required

 This is a legacy parameter.

 

  • 0
  • null

 Warning:

 Always set this value to 0 or null.

 0

 checkmain

 boolean

 Required

 Whether the function should search the account's /cpanelbrading directory.

  • 1 — Search the directory.
  • 0 — Do not search the directory.

 1

 

Returns

This function's return varies based on the input parameter's values.

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....