I'm trying to figure out the best way to implement pages with multiple editable content areas, each area on each page having a different set of HTML markup. The only solution I've found so far is to add a content type for each area so that I can create a custom block.

For example, on the homepage I have a mantle with image, title, and content:

enter image description here

Here's some example HTML I'd like to use for the structure of the editable content:

<div class="content content--who">
  <div class="container">
    <div class="row">
      <div class="col-xs-12 col-sm-10 col-sm-offset-1">
        <div class="content-wrap">
            <h2><?= $title ?></h2>
            <?= $content ?>

I'd like for the user to be able to edit the image, the title, and the content, without editing the HTML that makes up the structure of the page. Each page on the site will have a different HTML structure, as well as different content areas that need to be editable.


Take a look at the Panels and Panelizer modules; they'll provide the basic building blocks you need for the kind of layout and editing experience you want.

They'll let you create arbitrary layouts (Panels comes with a few...creating new ones is easy) and embed panes of content including just custom HTML (called a custom content pane) at arbitrary URLs or, using Panelizer, by customizing individual nodes on a per-node basis.

Use the Fieldable Panels Pane (FPP) module, or the Bean module, to let you define fieldable components that can be placed into a layout using Panels or Panelizer. So you could create an "image" FPP that has a field for a user to attach an image. You would then control the actual rules for how that image is output, and the markup that surrounds that image, by configuring the view modes for that FPP. Rinse and repeat for all the different sorts of elements you want users to be able to create.

  • I am using Panels, but not sure how the custom content panes will help. I can definitely just input the HTML directly, but I don't want the end users to accidentally delete it while editing the content. – WillP Aug 26 '15 at 17:11
  • It sounds like you have some specific requirements that you'll need to share. Obviously if someone can edit content, then they can also potentially delete content. Please be specific about what you're trying to achieve and we'll try to help you out. – Aaron Aug 26 '15 at 17:12
  • I've updated my original question with some more information. – WillP Aug 26 '15 at 17:21
  • @WillP I've updated my answer. – Aaron Aug 26 '15 at 17:25
  • Awesome. Thank you. I'll look into this and mark this as the answer if I don't have any further follow-ups. – WillP Aug 26 '15 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.