Jump to content

how to create a custom page in 1.6 ?


Recommended Posts

hello.

 

I have create a Test controller using this code :

 
class MyPageController  extends FrontController{  
	public $php_self = 'mypage';
	public function init() {
	    parent::init();
	}
	public function initContent() {    
		parent::initContent();    
		die('test!');    
	}
}

I put it in the /controllers/front/MyPageController.php and it does not work. i get a clean html page.

What am I missing ?

link to custom page : http://www.funtoy.co.il/index.php?controller=MyPage

Thanks. yaniv abo

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

  • 4 months later...

Okay so i followed all tutorials here and i've an issue :

 

My custom page here is working :

 

http://www.araclouds.com/index.php?controller=SliderAtoMods

 

BUT... ONLY with the "no redirection" option in the dropdown menu, if I change to 301 or 302 i've a 404 error... if someone here can explain me why... thanks in advance there is my php file 

<?php
class SliderAtoModsControllerCore extends FrontController
{
	public $php_self = 'atomods';
	
		public function init() {
			parent::init();
		}


		public function initContent() {
			parent::initContent();
			$this->setTemplate(_PS_THEME_DIR_.'modatos.tpl');
			}
}
?>

thanks in advance

Link to comment
Share on other sites

×
×
  • Create New...