所以我想首先我必须在style.php中load the Joomla Framework,并在那里定义变量$options = $this->params->get('option');
,但我不确定。
这有可能吗?我所有的测试都失败了......
这是一个例子:
require_once "scssphp/scss.inc.php";
use Leafo\ScssPhp\Server;
$directory = "scss";
Server::serveFrom($directory);
// Get Joomla! framework
define( '_JEXEC', 1 );
define( '_VALID_MOS', 1 );
define( 'JPATH_BASE', realpath(dirname(__FILE__)));
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
$option = $this->params->get('option');
如果我现在在style.scss中使用@option,我会收到此错误:
解析错误:未定义变量$ option:line:14