Description

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

Examples


$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.

 

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 Module="Branding::file( $FORM( 'file','isvar','pkg','inline', 'needfile','skipdefault','checkmain') )">
cpapi1 --user=username Branding file mythemes 0 my_theme 1 0 0 1

/cPanel_magic_revision_1267840609/branding/contactinfo_include.html 

 

Parameters

ParameterTypeDescriptionPossible valuesExample
filestring

Required

The file's name.

Any valid filename.mythemes
isvarBoolean

Required  

This is a legacy parameter.

 

 

  • 0
  • null

Always set this value to 0 or null.

0
pkgstring

Required  

The style for which to search.

Any valid style name.my_theme
inlineBoolean

Required  

Whether to print the file's contents.

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

Required

This is a legacy parameter.

 

  • 0
  • null

Always set this value to 0 or null.

0
skipdefaultBoolean

Required

This is a legacy parameter.

 

  • 0
  • null

Always set this value to 0 or null.

0
checkmainBoolean

Required

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

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

Returns

This function's output depends on the values of the input parameters.