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:

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."





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support