Hi guys, I just wanted my taxonomy in a basic item-list, so I had to hack up the _taxonomy_list_get_table function. It would be great if you considered a themeable function so this kind of hack would be unnecessary.

Comments

nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

You could provide some details on what you did. Patches are always welcome.

danielb’s picture

Well what I did is not clean enough to supply as a patch. My work does not rewrite the function properly, but rather tacks on an extra bit at the end of the func instead of theme('table'...

  $itemlist = array();
  foreach ((array)$rows as $item) {
    $itemlist[] = $item['data'][0]['data'];
  }

  return theme('item_list', $itemlist);

But it gives you an idea of what I was trying to do. Simply to have each cell as a list item, without the rows/cols structure of tables.

A good solution would be to create a function that simply builds an array of data (not in rows and cols) and then hands it off to a theme function which then arranges rows based on settings and calls theme_table, and themers could alternatively provide a theme that calls theme_item_list.

However my code does not take into account hierarchy handling or anything like that, which is further reason that I should not be the one to write a patch that can cleanly apply to everybody's use case.

nancydru’s picture

I'm thinking about adding a "title" op (in addition to "list" which would pretty much do what you want, I think. Theming like you mention is a horse of a different color though - it would be much harder to do.

danielb’s picture

I guess the core issue for me is that when I downloaded this module I was never expecting it to give table output (esp. considering the name of the module). Then to my surprise that was the only options. Table output is very difficult to style. In this particular case I have to layout my category list in a "U" shape (I'm not kidding) which is possible by overriding theme_item_list() with some extra classes based on the count of items, etc... but with a table it is very difficult to move cells out of the 'grid' layout they are fused in to.

nancydru’s picture

You have given me some ideas that I am mulling over; the most interesting one is getting all the before theming it. This may actually help with several requests, so I am looking at how to do it.

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Postponed (maintainer needs more info) » Active

I am doing a big rewrite that will allow you to theme it almost any way you can think of. This is taking quite a bit of time and testing, so please be patient.

nancydru’s picture

Status: Active » Closed (duplicate)

This will be a part of the rewrite: #312250: Wish List for rewrite