Sometimes we want to allow common users who write contents the privilege to suppress some regions like e.g. Sidebar right to fit very large contents in a page. For content writers, Admin UI could be too complex and risky to change (it's a site-wide screen, useful for admins).

This patch adds a new form on node add or edit form for privileged users (screenshot attached). This patch "convert" paths availables on Admin UI to region checkboxes for current path (node/NID) and inherit $record['visibility'] for that region.

  • Node settings are accepted for only 0 and 1, not for PHP (2).
  • Only current active theme is affected.

Note: The attached patch it seems to work but some tests are necessary. If someone more expert on Visibility API wants to check this patch please let me know!

Comments

chirale’s picture

StatusFileSize
new3.97 KB

An improved patch is attached.

chirale’s picture

StatusFileSize
new4.16 KB

Fix collapsed beahaviour.

chirale’s picture

When the module is installed, you have to visit admin/settings/region_visibility and click to Submit to generate records before node editing. I need help to fix this behaviour.