Removing Columns from One CMS Page in Prestashop

Unfortunately, there is no built-in Prestashop function to change the template on one page only. Let’s clarify the process of removing columns on CMS page. We are going to change one appearance (1) into another (2).

1

2

For this purpose we need to override the method displayFooter() of controller CmsControllerCore (for removing the right column). Override function first appeared in Prestashop 1.4 and allows to override the functionality without modifying the system core, i.e. no further problems will arise during the upgrade to the new version.

Let’s create CMSController file in /override/controllers/ folder with the following content:

We overrode the displayFooter () function and changed the template in which the right column was defined, without touching the system core. Now we create the final template with the file / themes / prestashop / footer_cms.tpl:

The standard footer.tpl looks this way:

By now there should be no right column on CMS page, but the page looks somewhat boring, so it would be nice to extend the content. Play with your CSS:

With this being done, we’ve changed the width of the content and our site looks much better.To delete the left column on your website, you repeat these steps, overriding displayHeader() instead of displayFooter() of controller CmsControllerCore.



14 comments

  1. It is necessary to change the following files:
    footer.tpl
    grid_prestashop.css
    footer.tpl:

    Delete\comment the following lines:

    It would be as well useful to call {$HOOK_RIGHT_COLUMN} in the right column at least; otherwise this hook modules will be removed
    grid_prestashop.css:
    Increase the width of the central column:

    For example: http://belvg.info/demo/prestashop/storelocator/index.php?controller=stores

  2. Hi !
    Thanks for this tip (sorry for my pitiful english).
    So I tried your method, but now I have a question : “Which part of the code selects the page where the right column is not appearing?”
    Because it didn’t work with my prestashop 1.5.3.1.
    I modified my CMSController file, next I created a footer_cms.tpl file but it didn’t changed anything. Did I missed something ?

    I hope you could help me even if your post has been posted a long time ago. =/

  3. Okay ! I’ll tried your module shortly. Thank you very much. I’m grateful to you who give your time to develop free modules. It’s very useful for guys like me !
    I’ll follow your blog too !

  4. Hi Alex,
    This is what I am looking to achieve and I think that I understand the script.
    How do I assign this to each page, ie one page with both left and right columns and one page with just left column.
    I am presuming I should cut and paste this code into new pages and upload new pages via ftp. Can you be more specific what pages I should copy, change and which folder to add them into?
    Or
    Can I pay you for a quick chat?
    Regards
    Paul

  5. Hardik,

    Sorry, but I do not understand your question. How is it related to the article? If this is a general question, which is not related to the topic of article, then please, provide more details about the issue.

  6. Paul Hart,

    You mean using the module соlumn_mаnаger for custome pages?

  7. will this method work for 1.5.4, i have hided the right column but it still reserving the space m i need this space

  8. Karam,

    To delete empty spaces you need to edit css. Unfortunately, the final version of this module has not been issued because the developers found this module unpromising.

  9. Hi Alex, could u pls tell me how to hide/disable all other modules except username & password on the sign in page … while in mobile view.

Post a new comment

top
BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *