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

  1. global $page, $addonRelativeCode;

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

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

4.  global $addonPathData

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

  1. global $addonDataFolder, $addonCodeFolder; //deprecated
⚠️ **GitHub.com Fallback** ⚠️