SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Drupal 6.x, Views, and Multiple ULs Per-Single View?

    Specifics:
    - Drupal 6.x
    - Views 6.x-2.16

    Problem:
    I'm trying to use a View to output multiple columns and organized by column instead of by row (i.e. - ordering each output vertically where at the end of each column, a new column is generated and populated until it gets to the end of that column, and so on.) I thought I had this working when I told the view to vertically-align, but as soon as I applied some floating CSS to the list-items, the order of each field appeared to be horizontally-aligned again.

    Long story short, I need the following layout with my view:
    Column 1 Column 2 Column 3 Column 4
    Field Item 1 Field Item 10 Field Item 19 Field Item 28
    Field Item 2 Field Item 11 Field Item 20 Field Item 29
    Field Item 3 Field Item 12 Field Item 21 Field Item 30
    Field Item 4 Field Item 13 Field Item 22 Field Item 31
    Field Item 5 Field Item 14 Field Item 23 Field Item 32
    Field Item 6 Field Item 15 Field Item 24 Field Item 33
    Field Item 7 Field Item 16 Field Item 25 Field Item 34
    Field Item 8 Field Item 17 Field Item 26 Field Item 35
    Field Item 9 Field Item 18 Field Item 27 Field Item 36
    [< Pager Here >]

    Would anyone happen to know how to achieve something like this?
    So far, I'm at a loss.

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,030
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    You're using the Grid Style and then grouping under a taxonomy term or something right? ...And you've got your Grid Settings set to vertical. Have you ticked the checkbox for "Fill up single line"?

    I've never done a Grid with columns but that's how I would expect to do it. I always use grid and fill the table left to right.

    Otherwise I might try something fancy with PHP where I set the style to unordered list and then at a certain count I wrap my ouput in a "column" div and then float them left.
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  3. #3
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,147
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Could you provide the actual context of that a column and "field item x". Without that my guess would be to use CSS tables. Views outputs enough extra, none-semantic garbage which should make it possible to style the output as tables using CSS.
    The only code I hate more than my own is everyone else's.

  4. #4
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I revisited the Grid display and removed the group-by parm. Seems to be working now (not sure if I did something else between point 'A' and 'B' that I'm forgetting but so far, it's looking and behaving perfectly).

    As for the context of this, it basically boiled down to rearranging how a View was outputting links to our Vendor pages. The page links were being output from left-to-right, row-by-row. I needed these links to instead be generated from top-to-bottom, column-by-column. Making those tweaks above seemed to do the trick. I'm not sure why I was unable to make this work the other day--I think I might've been in need for sleep or something, but in any event, it seems to be working flawlessly now.

    Thanks guys / gals. I know I'm not the best at explaining these things sometimes, especially when I'm running on fumes.

  5. #5
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,030
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Glad you got it sorted out ok. I'll look you up if I have the same trouble in the future.

    Cheers,
    Andrew
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •