1

I want to create a 3 column content on homepage which is having layout property as 1 column . How can i do this without changing the default layout of homepage?

Can i create a block with 3 columns and add it to the homepage?

2

In your controller execute method place the following piece of code which should set your desired layout.

  public function execute()
{

     $page = $this->resultPageFactory->create(false, ['isIsolated' => true]);           

     $customLayout = '3columns';

     $page->getConfig()->setPageLayout($customLayout);
     return $page;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.