0

In my project , I need to have some static pages Like, Contact Us About Us etc

Let us suppose that these pages have similar HTML structure like below:

<header>
<left block up> <right block up>
<left block down>
<footer>

But the content for each blokc will be different for different pages

Is there anything in magento so that user can add content for these blocks from backend but the HTML will come from my xml, and user will have access to limited content only

Thanks

0

This is possible in Magento. You will need to create one ore more new page layouts : http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/layouts/layout-overview.html

You can then in one ore more templates files depending on how you wish to organize your blocks insert in this layout your static content.

Once this is done your admins will be able to create new CMS pages & in these pages chose among the layouts you have created.The content of the page the admin enters will be displayed in the part of the layout you configured when creating your layout.

By default magento has :

  • 1 column
  • 2 column (with left & right)
  • 3 column

You can see how those where done to create your own.

  • Can you please refer to any example on how to implement this? – anujeet Feb 27 '17 at 13:37

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.