I'm new to drupal and I have a question about views:
I'm building an employee directory and need to display the results in two columns, such as:
Record 1 Record 2
Record 3 Record 4
Record 5 Record 6 . . .
How can I accomplish this?
To take it one step further, I want each record formatted as:
IMAGE NAME
TITLE
I have no idea where to开发者_运维技巧 start. Any assistance is appreciated!
you can either:
- choose Style: Grid (this will give you a table with as many rows you'd like).
- use CSS. quickest way to do it:
add some margin-bottom and fixed-height as well. also, you may find it useful to add:.view-id-$VIEWNAME .views-row{float: left; width: 40%; }
.view-id-$VIEWNAME .view-content{overflow: hidden;}
In view you can choose Style: Grid (this will give you a table with as many rows you'd like). according to your question you can choose 2 row. and in css .view-id-$VIEWNAME .views-row{float: left; padding: 5px; width: 40%; }
You could change the style of your view to Table, which would give you columns.
First, add a Node: Type filter that only displays the content you want.
Next, add your fields. You can change the Label to the name of the column.
Then under Basic Settings, change the Style flag to Table (or another format if you prefer).
You can then see how the live preview outputs your view.
精彩评论