This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » General » How to disable a layout

How to disable a layout

How to disable a layout

Monday 17 June 2013 8:22:30 am - 5 replies

Is there any way of disable a layout/set/print layout?

Best regards.

Modified on Monday 17 June 2013 8:23:03 am by Israel Martín

Monday 17 June 2013 2:50:39 pm


There is layout.ini file - you can override it and set another pagelayout for print version (for example empty pagelayout - without $module_result).
You can also block this view by using site.ini (overrida) and set a new variable for SiteAccessRules block.

Monday 17 June 2013 5:00:51 pm

Add something like this to your site ini:


This will then display:

View is disabled

  • The view layout/set is disabled and cannot be accessed.

Tuesday 18 June 2013 10:48:12 am

Thanks both for answering.

My problem is solved.

Tuesday 18 June 2013 2:37:00 pm

Steven, your suggestion will work fine but it will block any other layouts as well.

Wednesday 19 June 2013 9:31:04 am

That's true Radek.  But I think that most of the time layout/set isn't ever used for anything but layout/set/print.  But, I did - a long time ago - use this in an extension to create a different layout.  I forgot about that.  So, yeah, you do have to be careful that if you use this module for something else then don't disable it.

Which also makes me ask what the purpose is to disable it - probably because you don't want the layout set print pages indexed by search engines which then sends visitors to the ugly print page instead of your nicely designed page?   If that's the case, then you can add <meta name="robots" content="none" /> to your print pagelayout (assuming it's a different one) and/or add something like this to your robots.txt (this way people can still have a separate print page):

 User-agent: *
Disallow: /layout

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from