Osoba Osaze
Osoba Osaze

Reputation: 93

How to add modules to custom Opencart page

I'm using a custom page extension from Opencart http://www.opencart.com/index.php?route=extension/extension/info&extension_id=20816&filter_search=page&page=2

But the problem is its not showing up when I try to put in modules on the page.

The template file looks intact, I've pasted the code below

<?php
class ControllerCustomHelloWorld extends Controller
{
    public function index(){

            // VARS
$this->language->load('custom/helloworld');
$this->data['breadcrumbs'] = array();
    // set title of the page
$this->document->setTitle("Register on AutoHouse Express");


    $this->data['heading_title'] = $this->language->get('heading_title');

        $this->data['button_continue'] = $this->language->get('button_continue');

        $this->data['description'] = '';

        $this->data['continue'] = $this->url->link('common/home');
            $template=$this->config->get('config_template') ."/template/custom/hello.tpl"; // .tpl location and file

    $this->load->model('custom/hello');

    $this->template = ''.$template.'';

    $this->children = array(

       'common/column_left',
        'common/column_right',
        'common/content_top',
        'common/content_bottom',
        'common/footer',
        'common/header'

    );      

    $this->response->setOutput($this->render());

}
}
?>

But for some reason, the page is not accepting modules into any of the positions.

I'd appreciate any help on this.

Thanks.

Upvotes: 0

Views: 1272

Answers (1)

Nitin
Nitin

Reputation: 326

Make sure that you have entered correct route while creating a layout for this page.

To create a layout:
1. Go to System>design>layouts
2. Click on "Insert layout"
3. Enter layout name and use route as custom/helloworld
4. Save it
5. Now select this page in layout option in the module admin panel, which you want to show up on this newly custom page.

Upvotes: 2

Related Questions