By forodo on
I'm using panels to display some static and some dynamic content on the same page. My problem is that I want one of my panels to contain 4 images with accompanying titles arranged in a 2x2 grid. I can't find a way to do this - do I need to create a custom view type? If so, can anyone suggest how? Thanks.
Comments
CCK, Views and Panel
Yeh, that's your best bet. Check out www.palmcenter.org. The frontpage body is a panel view. The upper left is static content. The "New @ the Center," "Latest Press Release" and "Latest Publication" all pull dynamic content from custom views queries. I've used the block views from these queries - and then themed them with phptemplate and CSS. "New @ the Center" block pulls the 3 most recent nodes of all CCK types in the system that have been checked "promote to front page". The two "Latest" blocks pull the most recent of two different CCK types NOT selected to be promoted to the front page
(There are a lot of different ways that you could use taxonomy to refine these queries. This way just worked best for me.)
Good luck!
Sean
Sean Larkin
Perhaps I'm misunderstanding...
Thanks for the reply - very helpful. One thing though - I want to be able to arrange my results in 2 rows and 2 columns. It looks as though the panels on www.palmcenter.org just contain straight lists of dynamic data. I can't see a way (even with a custom view) to retrieve data from a view in such a way as to be able to format in a 2x2 grid. My guess was that perhaps it would be the View Type in the custom view. Is that any clearer? Am I going about this the right way?
TIA,
Alex.
2x2 grid
Sorry Alex, I guess I didn't understand completely. How are you going to pull these nodes and arrange them in the grid? Will each of the 4 spots contain content pulled by different views queries? For example, are they the latest submission of 4 different content types?
If that's the case, or if you're pulling based upon taxonomy terms (you could set up a vocabulary called "show on grid" with terms: top-left, top-right, bottom-left, bottom-rigth, none), what I wrote should work. Go with a 2 column panel layout and then add two views blocks to each column. They will stack on top of each other. You could then use CSS to fix the heights of these blocks and potentially add borders to give the full appearance of a 2x2 grid. Does that make sense?
I hope that I'm still helping. It's hard to conceptualize what you're looking for without some sort of visual.
Good luck!
sean
Sean Larkin
2x2 grid
Hi Sean,
I'm not using taxonomy (not yet at least). My original intention was to have a single view query so that the 4 grid items could be the 4 latest submissions of a single type with fixed parameters. I'm still not sure I can do it with your suggestions! :-) However, they are a great help - at least I've got some idea of where I'm going now.
Thanks v much!
Alex.
I have the same your problem
I have problem when display 4 records in 2x2 grid. The current views type can't do that.
Have you have any solutions? Contact me, please.
Thanks
Nobody can answer ?
Have anyone answers this problem ?
You may want to look at the
You may want to look at the Matrix Field module: http://drupal.org/project/matrix