Jump to content

mymodule renderView()


Recommended Posts

Hello, help me ?
I have a grid and would like to know how to get as information in .tpl


my controllers/admin/AdminAlienTicketController.php

public function renderView()
                $tpl = $this->context->smarty->createTemplate(dirname(__FILE__). '/../../views/templates/admin/view.tpl');
                $tpl->assign('alientickets', $this->loadObject());
                return $tpl->fetch();

When I click the View button, it displays the .tpl, but it does not load the items in the row that I clicked.


my view.tpl

<div class="form-group clearfix">
      <label class="col-lg-3">{l s='RG:' mod='alienticket'}</label>
      <div class="col-lg-9">{$alientickets->rg}</div>
    <div class="form-group clearfix">
      <label class="col-lg-3">{l s='Email:' mod='alienticket'}</label>
      <div class="col-lg-9">{$alientickets->email}</div>


Link to comment
Share on other sites

From the code you posted we don't see how the object alientickets is loaded and if it is correctly loaded.

Try to dump the object within HTML comments.

echo "<!-- DUMPING OBJECT ";
echo "<pre>";
echo "</pre>";
echo " -->";

After you load the modules pages, view the source code. I'd say the object is empty.

Edited by Scully (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...