Reputation: 9183
I have two questions:
In a controller ControllerMainIndex
in opencart we do define
$this->children = array("common/footer");
Then how should I utilize it in the main/index.tpl file?
It is a little bit vague for me. We have told the controller to get footer but in the main file how should we specify their position?
Second question, I create controller ControllerMasterNewPage and then in I $this->render() (after setting the template to "master/newpage.tpl").
But how should I access this controller? I means what should be typed in the browser for this controller to be process and have output?
Upvotes: 0
Views: 761
Reputation: 43479
1) Just call <?php echo $footer ?>
it will output that child content
2) http://example.com/index.php?route=path/MasterNewPage/actionName
e.g.: We have file in {root}/catalog/controller/product/category.php
(class name ControllerProductCategory
), call it: http://example.com/index.php?route=product/category
Upvotes: 1