Jump to content
zsigmondszilveszter

Using renderView() in a custom module admin controller

Recommended Posts

Hi, 


 


I am a presta newbie and I have the following question. I have already asked this in an existent topic, but am afraid of everybody think that is an answer. Is this the proper way to display something under a back-office modul. I have already tried the hookdisplaySomething method too.


So I created a custom module with custom controller, then  under Administration->Menus I created a new admin menu with the new module and controller. After that I created a test template file under "modules/szilveszterfirst/views/templates/admin/szilveszter_first/helpers/view/test.tpl". Everything works fine, except the renderView function, the template file is loaded(I printed out the result), but in the admin page doesn't show anything. Is there any prerequisite, that I didn't do? e.g. the template should contain something special(actually contains a few html tags for test sake)?


 


The following question is also the same, but is not answered. http://stackoverflow.com/q/28948166/3604337



class AdminSzilveszterFirstController extends ModuleAdminController {

public function __construct() {
$this->lang = false;
parent::__construct();
}

public function initContent(){
$this-> renderView();
return parent::initContent();
}
public function renderView() {
$this->base_tpl_view = 'test.tpl';
//printf("<pre>%s</pre>",print_r(parent::renderView(),true));
return parent::renderView();
}
}

Edited by zsigmondszilveszter (see edit history)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More