1

I want to define my own block regions for the front page

I want to have a grid of blocks, each block containing a list of recent media (pictures, youtube, audio) with a certain tag. See example wireframe as ascii art below

A rule with the blocks is that if an item has already appeared in one block, then it doesn't appear in the others (media items can have multiple tags obviously).

Questions after the drawing.

+-----------------------------------+
! main menu                         !
+-----------------------------------+
! rolling display                   !
!                                   !
!                                   !
+-----------+-----------+-----------+
! tag a     ! tag b     ! tag c     !
! heading   ! heading   ! heading   !
+-----------+-----------+-----------+
! list      ! list      ! list      !
! of media  ! of media  ! of media  !
! with tag a! with tag a! with tag c!
! & thumb   ! & thumb   ! & thumb   !
! nail for  ! nail for  !nail for   !
! each item ! each item ! each item !
+-----------+-----------+-----------+
! tag d     ! tag e     ! tag f     !
! heading   ! heading   ! heading   !
+-----------+-----------+-----------+
! list      ! list      ! list      !
! of media  ! of media  ! of media  !
! with tag d! with tag e! with tag f!
! & thumb   ! & thumb   ! & thumb   !
! nail for  ! nail for  !nail for   !
! each item ! each item ! each item !
+-----------+-----------+-----------+
! tag g     ! tag h     ! tag i     !
! heading   ! heading   ! heading   !
+-----------+-----------+-----------+
! list      ! list      ! list      !
! of media  ! of media  ! of media  !
! with tag g! with tag h! with tag i!
! & thumb   ! & thumb   ! & thumb   !
! nail for  ! nail for  !nail for   !
! each item ! each item ! each item !
+-----------+-----------+-----------+

Please outline specifically how I would go about doing this. I'm looking for a fairly definitive answer - i.e. something that won't break something else, and is robust in itself.

Specific questions:

  1. Would I use PHPTemplate and if so how? Would I use this to declare the regions, and how?

  2. What would the roles of Panels, Views and Blocks be in creating this layout?

  3. Can I create the layout in panels without writing any PHP code?

  4. Presumably the Views module would provide the content within the blocks.

  5. How do I tell Views and Blocks where to put the content, i.e. in a particular block?

| improve this question | | | | |
  • I made it by hand. No program used. I used the <pre> tag to enable fixed width font. – therobyouknow Aug 31 '11 at 13:55
1
  1. If you just need it on your front page, doing it in page template is wrong.
  2. You can do in in Panel - create new panel for logged and not logged users; use there blocks; and views' display 'panel pane' for using views which need argument from context.
  3. Yes you can
  4. It can, but sending view argument this way is really painful. I recommend use panels panes.
  5. You set it in panel.
| improve this answer | | | | |
  • +1 Thanks @Marcin Wosinek - I'll look into Panels further and report back. Once I have a solution I may add further comments to your answer and accept your answer as panels being the basis of my solution. – therobyouknow Aug 31 '11 at 13:55
  • Accepted answer. Because it gives me the right guidance about the best steps to take. That is exactly what I need, before I invest time in learning and developing the solution based on that. – therobyouknow Sep 1 '11 at 7:41

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.