Actually I was going to use similar thing myself, just didn't have time for implementing this as module. So nice that you implemented it.

I think this will work for $links ( node links, comment links, forum post links) too.

Comments

crea’s picture

Well it can be done using some CSS but having central place for maintaining all site buttons would be awesome!

sun’s picture

well, that's basically easy... just apply the CSS class 'button' to all list items of links, i.e. ['#attributes']['class'] = 'button'.

Not sure though, how to integrate this in a non-breaking way, because, personally, I wouldn't want to turn links into buttons on my sites.

crea’s picture

Well, one example where links as buttons makes perfect sense is forums. Advanced Forum, for example, implements for each link button-like appearance via background images. But I don't like this approach cause it takes lot of effort to make separate image for every button, and I think "sliding door" is better fit for this case. With "sliding door" themer also automatically gets same style for buttons because they share same background, and changing style is so easy - compare to making another set of background images for every button.

crea’s picture

Applying class doesn't work for me. "Sliding door" needs 2 "door" backgrounds so I think it requires custom theming function ( theme_links() ) to work.

sun’s picture

oh, you need to apply the class on the LI, not on the A. The styles are already prepared to turn the entire list item into a button.

We could be able to do this, if #588148: theme_links() is not really themeable was already in core. So please help to get this sucker in.

crea’s picture

Since the time I tested your module, I played with it lot, and abandoned finally. To make it fully cross-browser is really recipe for nightmare.. :(

crea’s picture

oops dupe

crea’s picture

oops dupe

sun’s picture

Status: Active » Fixed

Alright, since you no longer use it, I'm closing this request.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.