'how to change module xml params in front end
Do not bother I am using a Joomla weather module. In this module the administrator can enter the name of a city and its weather data can be seen in the city. I'm going to change this, so it seems to be about information the cities listed in the param. management environment without the need to enter the name of the city through the list you can select the name of the city. I need to be in the user's environment to do it. So need to change param in user environment. can you help?!
admin xml param :
<param name="location" type="list" default="Tehran" label="LOCATION" description="LOCATION_DESC">
<option value="Tehran">Tehran</option>
<option value="Karaj">Karaj</option>
<option value="Mashhad">Mashhad</option>
<option value="Shiraz">Shiraz</option>
<option value="Tabriz">Tabriz</option></param>
using code in front :
<td><select name="location" label="LOCATION" description="LOCATION_DESC">
<option value="Tehran" <?php if ($params->get('location') == "Tehran") echo "selected";echo $location ?> >Tehran</option>
<option value="Karaj" <?php if ($params->get('location') == "Karaj") echo "selected"; ?> >Karaj</option>
<option value="Mashhad" <?php if ($params->get('location') == "Mashhad") echo "selected"; $params->get('location') = Mashhad; ?> >Mashhad</option>
<option value="Shiraz" <?php if ($params->get('location') == "Shiraz") echo "selected"; ?> >Shiraz</option>
<option value="Tabriz" <?php if ($params->get('location') == "Tabriz") echo "selected"; ?> >Tabriz</option>
</select></td>
image :[http://photos.vne.ir/img/2a1d073d5ed3.jpg][1]
،To change the city needs to change is the Param, whether it is correct?
How changes in the $params->get('location') ?
$params->get('location') = value;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
