PostNuke Help |
||
|---|---|---|
Previous |
Next |
|
get module variable
mixed pnModGetVar(module, name);
pnModGetVar() obtains a module-specific variable from the PostNuke system.
The well-known name of a module from which to obtain the variable
The name of the module variable to obtain
This function returns the requested variable if the variable exist. If the variable does not exist then this function will return void. This function returns void if an exception was raised.
This function raises BAD_PARAM if you pass an invalid parameter. This function raises DATABASE_ERROR if an error occurs while querying data.
A module's well-known name is the uniquely assigned name by which the module is know throughout the PostNuke community. The well-known name normally corresponds to the directory in which the module code is placed; module information can be found from any PostNuke system by going to the modules administration section. Examples of well-known names are 'News', 'FAQ', and 'Comments'.
This function does not get the configuration information of the module itself. To obtain information such as the module ID or its current status you must the other PostNuke API calls available.
// Get the version information for the 'News' module
$newsmodver = pnModGetVar('News', 'Version');
Previous |
Next |