Addon ‐ Variables - gtbu/Typesetter5.2 GitHub Wiki

1.  global $addonRelativeCode - A relative path to your plugin code.

This variable can be used to accurately point to files in your addon that need to be accessed from a browser.

=== Style Sheets ===

global $page, $addonRelativeCode;

$page->head .= '< link rel="stylesheet" type="text/css" href="'.$addonRelativeCode.'/style.css'.'" />';

4.  global $addonPathCode - An absolute path to your plugin code.

Similar to $addonRelativeCode, $addonPathCode gives you a path to the directory where your addon code resides.

$addonPathCode, however, is an absolute path like  /var/www/typesetter/data/_addondata/addon_name

5.  global $addonPathData

6.  $addonPathData gives you an absolute path to a writable folder within the /data folder specific to your addon.

⚠️ **GitHub.com Fallback** ⚠️