Parameters to a Module - Joomla! Forum - community, help and support
i create own module: mod_a
i created 2 files, mod_a.xml , mod_a.php. i created css files not important here.
here code mod_a.xml:
here code mod_a.php:
which next step ? do need create database table mytitle , mytext ?
thank !!!
i created 2 files, mod_a.xml , mod_a.php. i created css files not important here.
here code mod_a.xml:
code: select all
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="2.5" client="site" method="upgrade">
<name>mod_a</name>
<files>
<filename module="mod_a">mod_a.php</filename>
</files>
<config>
<fields name="params">
<fieldset name="basic">
<field name="mytitle" type="mytext" default="my title" label="mod_a_field_mytitle_label" description="mod_a_field_mytitle_desc" />
<field name="mytext" type="text" default="lorem ipsum..." label="mod_a_field_mytext_label" description="mod_a_field_mytext_desc" />
</fields>
</config>
</extension>here code mod_a.php:
code: select all
<?php
defined( ‘_jexec’ ) or die( ‘restricted access’ );
$atitle = $params->get('mytitle');
$atext = $params->get('mytext');
?>
<div class="a">
<div class="a_title">
<?php echo $atitle; ?>
</div>
<div class="a_text">
<?php echo $atext; ?>
</div>
</div>which next step ? do need create database table mytitle , mytext ?
thank !!!
ok.
i can answer myself
"parameters must well-defined in xml file , that's all."
i can answer myself
"parameters must well-defined in xml file , that's all."
Comments
Post a Comment