Jump to content

Dispatch controller without header and footer


hurquiza
 Share

Recommended Posts

Hi, I would like to dispatch a front controller yet not showing header nor footer. I'm trying this but no avail:

 

require(dirname(__FILE__).'/config/config.inc.php');
$controller = Controller::getController("AuthController");
$controller->displayFooter(false);

$controller->run();


Thanks!

 

Share this post


Link to post
Share on other sites

I think you need to put this in the public function init() it should look like this.

public function init()
{
$this->page_name = 'pagename'; // page_name and body id
$this->display_header = false; //hides header;
$this->display_footer = false; // hides footer;

parent::init();
}

Of course you can hide any of the hooks using this

 

example: 

$this->display_column_left = false, $this->display_column_right = false

  • Like 1

Share this post


Link to post
Share on other sites

So, I'd need to override AuthController class init() method, but that would affect whole shop.

 

I've changed my approach on this problem. What I'm trying to do is to show a modal form that will ask for email address, once entered it will create a new user with temporary [edit me] name and password and log that new customer in.

 

Final objective is to allow not logged in/registered clients to favorite a product

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

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