Submitted by cableman on Tue, 11/15/2011 - 14:15
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
; ----- / CONTEXT INLINE EDITOR LOCKED REGIONS ----
regions_locked[] = search
regions_locked[] = branding
regions_locked[] = menu
; ----- / HIDDEN REGIONS ----
regions_hidden[] = footer_sitemap
Add new comment