&path=Path;text;assets/modules/mymodule/
thanks once again
They are available to code within the module as variables. For example, &path=Path;text;assets/modules/mymodule/ would be available as $path.
Don’t forget that if you want to access it within a function, you would most likely have to do a global $path; in the beginning of your function, unless you pass it to the function as an argument.
class MyClass{
public function functionName
{
global $status,$offline_message;
echo $status; //displays nothing
echo $offline_message; //displays nothing too!!
}
}
From here:
Why do we need the Path;text part of the declaration? Would this work: &path=assets/modules/mymodule/&path=Path;text;assets/modules/mymodule/
&name = Description;datatype;value
global $modx;
// get module data
$sql = "SELECT * " .
"FROM ".$modx->getFullTableName("site_modules")." " .
"WHERE name = ’ModuleName’"; //your own module name
$rs = mysql_query($sql);
$content = mysql_fetch_assoc($rs);
// load module configuration
$parameter = array();
if(!empty($content["properties"]))
{
$tmpParams = explode("&",$content["properties"]);
for($x=0; $x<count($tmpParams); $x++)
{
$pTmp = explode("=", $tmpParams[$x]);
$pvTmp = explode(";", trim($pTmp[1]));
if ($pvTmp[1]==’list’ && $pvTmp[3]!="") $parameter[$pTmp[0]] = $pvTmp[3]; //list default
else if($pvTmp[1]!=’list’ && $pvTmp[2]!="") $parameter[$pTmp[0]] = $pvTmp[2];
}
}
extract($parameter, EXTR_SKIP);