0

I need to create a home page with several content areas containing text and images (e.g. welcome text, welcome image on a different section of the same page, a second welcome text on a different section of the same page, a third text content area, etc). All of these, of course, is in the same page as some other regions and blocks.

My googling led me to these options:

  • Create a content type for each of those content. I think this option is a bit overkill since the content type will only be used for one instance of the content type. Doing this will also require creating a block specifying the particular instance of the content type.
  • Create a system settings page using hook_admin a make each of the content sections a system variable. This also sounds incorrect since those content aren't really system variables. This method also isn't applicable since there is no sense of authorship and doesn't work with the workflow modules.

So what's the usual practice for doing this?

3

You can try to use Views and make little blocks of content type flagged to the front page if you want.

Another options is Panels or Panelizer and using custom content in Panelizer to layout your frontpage however you want.

Or if you're really brave hook_page_build.

I've used your 2nd option on sites; if Workflows is an issue for you, you will want to try either Views or Panelizer as those tools play more friendly with workflows (it's all about the UX and how much you want to empower your site maintainers).

  • I like to use Panels for this sort of thing. – Rob Mar 5 '14 at 2:13
  • @Rob, can you elaborate why you like to use Panels for this sort of thing? In my first evaluation of Views, it's pretty much straight-forward: create or reuse a content type, create content, use Views to create a block, load block via a region or invoking it. It would be nice to know how Panels will make our lives easier. – Randell Mar 5 '14 at 23:18
  • @tenken, one issue I see with using views + blocks + content type for text that I want to show up in the home page is that contents generally have their own url/page, but I only want to show the content in the home page but not have its own page. – Randell Mar 7 '14 at 4:43
  • yup. prepare to have your mind blown! .... make a custom content type and install the Rabbit Hole, drupal.org/project/rabbit_hole, module for these types of content. (this is the easiest approach) – tenken Mar 7 '14 at 8:22

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.