Var template not see

Discussion in 'Developers' Forum' started by stefanmcds-mnt, Nov 12, 2014.

  1. i've created for my EPP Client module the epp_domains_list.php it was created also epp_domains_list.htm but the template not see the var domains

    the epp_domains_list.htm
    Code:
    <h2><tmpl_var name="list_head_txt"></h2>
    
    <div class="panel panel_list_epp_domains">
    
      <div class="pnl_toolsarea">
        <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend>
          <div class="buttons">
            <button class="iconstxt icoAdd" type="button" onclick="loadContent('eppclient/epp_domains_edit.php');">
              <span>{tmpl_var name="add_new_record_txt"}</span>
            </button>
          </div>
        </fieldset>
      </div>
    
      <div class="pnl_listarea">
        <fieldset><legend><tmpl_var name="list_head_txt"></legend>
          <table class="list">
            <thead>
              <tr>
                <th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th>
                <th class="tbl_col_domains" scope="col"><tmpl_var name="domains_txt"></th>
                <th class="tbl_col_buttons" scope="col">&nbsp;</th>
              </tr>
              <tr>
                <td class="tbl_col_active"><select name="search_active" onChange="submitForm('pageForm','eppclient/epp_domains_list.php');">{tmpl_var name='search_active'}</select></td>
                <td class="tbl_col_domains"><select name="search_domains" onChange="submitForm('pageForm','eppclient/epp_domains_list.php');">{tmpl_var name='search_domains'}</select></td>
                <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','eppclient/epp_domains_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
              </tr>
            </thead>
            <tbody>
              <tmpl_loop name="records">
              <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
                <td class="tbl_col_active"><a href="#" onclick="loadContent('eppclient/epp_domains_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a></td>
                <td class="tbl_col_domains"><a href="#" onclick="loadContent('eppclient/epp_domains_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="domains"}</a></td>
                <td class="tbl_col_buttons">
                  <div class="buttons icons16">
                    <a class="button icons16 icoDelete" href="javascript: del_record('eppclient/epp_domains_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
                  </div>
                </td>
              </tr>
              </tmpl_loop>
              <tmpl_unless name="records">
                  <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
                      <td colspan="2">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
                  </tr>
              </tmpl_unless>
            </tbody>
            <tfoot>
              <tr>
                <td class="tbl_footer tbl_paging" colspan="3"><tmpl_var name="paging"></td>
              </tr>
            </tfoot>
          </table>
        </fieldset>
      </div>
    
    </div>
    
    the epp_domains_list.php
    Code:
    <?php
    require_once('../../lib/config.inc.php');
    require_once('../../lib/app.inc.php');
    
    /******************************************
    * Begin Form configuration
    ******************************************/
    
    $list_def_file = 'list/epp_domains.list.php';
    
    /******************************************
     * End Form configuration
     ******************************************/
    
    //* Check permissions for module
    $app->auth->check_module_permissions('eppclient');
    
    // Loading the class
    $app->uses('listform_actions');
    
    // Optional limit
    // $app->listform_actions->SQLExtWhere = 'type = 'alias'';
    
    // Start the form rendering and action ahndling
    $app->listform_actions->onLoad();
    
    ?>
    
    the epp_domains.list.php
    Code:
    <?php
    // Name of the list
    $liste ['name'] = 'epp_domains';
    
    // Database table
    $liste ['table'] = 'epp_domains';
    
    // Index index field of the database table
    $liste ['table_idx'] = 'id';
    
    // Search Field Prefix
    $liste ['search_prefix'] = 'search_';
    
    // Records per page
    $liste ['records_per_page'] = 15;
    
    // Script File of the list
    $liste ['file'] = 'epp_domains_list.php';
    
    // Script file of the edit form
    $liste ['edit_file'] = 'epp_domains_edit.php';
    
    // Script File of the delete script
    $liste ['delete_file'] = 'epp_domains_del.php';
    
    // Paging Template
    $liste ['paging_tpl'] = 'templates/paging.tpl.htm';
    
    // Enable auth
    $liste ['auth'] = 'yes';
    
    // ****** Search fields
    $liste["item"][] = array( 
    		'field'  => "active",
    		'datatype' => "VARCHAR",
    		'formtype' => "SELECT",
    		'op'  => "=",
    		'prefix' => "",
    		'suffix' => "",
    		'width'  => "",
    		'value'  => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
    
    $liste ['item'] [] = array (
    		'field' => 'domains',
    		'datatype' => 'VARCHAR',
    		'formtype' => 'SELECT',
    		'op' => '=',
    		'prefix' => '',
    		'suffix' => '',
    		'width' => '',
    		'datasource' => array (
    				'type' => 'SQL',
    				'querystring' => 'SELECT id,domains FROM epp_domains WHERE {AUTHSQL} ORDER BY domains',
    				'keyfield' => 'id',
    				'valuefield' => 'domain' 
    		),
    		'value' => '' 
    );
    
    ?>
    
    can you help me?
     

Share This Page