Joomla 1.0.13 problem...
I'm trying to write a module that has several parts...
I splitted up the functions of my module into functions, but the data that i retrieve through the function is not sowing up...
I go to my page and it standard shows content , when submitting to that same page its showing other content depending on what is submitted
I have several submits , so i putted al the possebilitys into several functions
that function then gets the data from the params in the module.xml file and then my table / page and so on is build in the same script and put into 1 variable , and that variable is set into a template that is then shown by the html output.
All of that works fine except of the data that i try to retrieve with the get--> $param
all i get is the default value...
Joomla help quote
mod_whois.phpThe mosParameters class constructor takes two arguments, the first the textual parameter values retrieved from the database, and the second in the xml setup file where the parameters are defined. See the following example:
global $mainframe;
$option = 'com_content';
// get params definitions
$params =& new mosParameters( $menu->params, $mainframe->getPath( 'com_xml', $option ), 'component' );
To display the parameters pass the params variable to your display function and simply echo the text returned by the "render" method, for example:
render();
}
?>
Code: Select all
function ToonPakketPrijzen($joomlaref, $debug)
{
global $mainframe;
$params = & new mosParameters( $module->params , $mainframe->getPath( 'com_xml', 'mod_whois' ), 'module' );
$pakketn1 = $params->get( 'naam1', 'Pakket 1' );
$pakketn2 = $params->get( 'naam2', 'Pakket 2' );
$pakketn3 = $params->get( 'naam3', 'Pakket 3' );
$webruimte1 = $params->get( 'webr1', '5 MB' );
$webruimte2 = $params->get( 'webr2', '6 MB' );
$webruimte3 = $params->get( 'webr3', '7 MB' );
}
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<mosinstall type="module" version="4.5.2">
<name>Whois</name>
<author>Eeckhaut Didier</author>
<creationDate>oktober 2007</creationDate>
<copyright>(C) 2007 Smart Trade bvba</copyright>
<version>1.0</version>
<description>Modulle Whois</description>
<files>
<filename module="mod_whois">mod_whois.php</filename>
<filename>mod_whois/mod_whois.html</filename>
</files>
<params name="whois">
<param name="moduleclass_sfx" type="text" default="" label="Module Class Suffix"
description="Een voorvoegsel dat moet toegevoegd worden aan de css class van de module(table.moduletable),
dit laat toe om de module individueel te stylen" />
<param name="@spacer" type="spacer" default="" label="*** Pakket 1 ***" description="" />
<param name="naam1" type="text" size="12" default="" label="Naam"
description="Te displayen naam voor het pakket" />
<param name="webr1" type="text" size="9" default="" label="Webruimte"
description="Hoeveelheid webruimte ( eenheid ook op te geven )" />
<param name="datal1" type="text" size="9" default="" label="Data Limiet"
description="Hoeveelheid Toegestane Datalimiet ( eenheid ook op te geven )" />
</params>
</mosinstall>
So how do i get the $params->get to work from within a function ?