You are here

Context inline editor and locked regions

We normally builds sites a round a concept that allows editors to drag & drop blocks around the site, thereby adding information boxes to pages. We use nodespotbox, context, context in-line editor and context filter modules to build this functionality.

We ran into a problem where users would be able to add blocks/spotboxes to regions, that we did not want them to (such as menu and search regions). I found that you can prevent regions from being editable in the context in-line editor by adding a "locked_regions" array to the themes info file as shown below.

; ----- / CUSTOM REGIONS / -----
regions[user_first] = User Bar First
regions[branding] = Branding
regions[search] = Search
regions[menu] = Menu
regions[sidebar_first] = Sidebar First
regions[sidebar_second] = Sidebar Second
regions[header] = Header
regions[footer] = Footer
regions[footer_sitemap] = Sitemap

regions_locked[] = search
regions_locked[] = branding
regions_locked[] = menu

; ----- / HIDDEN REGIONS ----
regions_hidden[] = footer_sitemap


Drupal 7 context nodespotbox

Add new comment