Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
In view, you can choose an icon instead of a link for the "user contact link" field. It would be nice to have the same option for all links. Just choosing the icon from a library.
nice way to keep text for search engines and hidding it in order to leave space for the image. But are you sure this will not generate any bug with Opera or IE ?
Am I missing something, or does this CSS technique only allow to have a fixed icon that won't change with the state of the toggle link? As far as I can tell, clicking on the toggle link doesn't change or add any classes, so you'd be left with a static icon that doesn't change to reflect the state of the toggle link. Is there any way to accomplish that?
There is a class that changes, although I think it's a really badly chosen one.
For published nodes (internally the status field) the classes are like "fasttoggle fasttoggle-status-node-123-status-1" and for unpublished ones "fasttoggle fasttoggle-status-node-123-status-0".
Separating the type (status/sticky/promoted) from the actual status like "fasttoggle fasttoggle-status-node-123 status-0 would result in easier and and more permanent CSS selectors... probably easy to patch.
Comments
Comment #1
kkaefer commentedThis is a theming issue.
Comment #2
gregoiresan commentedIn view, you can choose an icon instead of a link for the "user contact link" field. It would be nice to have the same option for all links. Just choosing the icon from a library.
Comment #3
mattiasj commentedI agree this is a theming issue and should be done with css instead.
Comment #4
gregoiresan commentedcan we hide text, replace it by an image and make it clickable with CSS ? If you know how to do this, I'd be happy to learn :)
Comment #5
mattiasj commentedyes, here is an example for the fasttoggle_promote link, hide the text, specify width and height of the image.
.fasttoggle_promote a {
display:block;
width:50px;
height:20px;
background:url(images/toggle-promote.gif) top left no-repeat;
text-indent:-9999px;
}
Comment #6
gregoiresan commentednice way to keep text for search engines and hidding it in order to leave space for the image. But are you sure this will not generate any bug with Opera or IE ?
Comment #7
mattiasj commentedno, this will work fine!
Comment #8
gregoiresan commentedGreat trick, thanx !
Comment #9
nigelcunningham commentedLooks to be fixed; closing.
Comment #10
soundboy89 commentedAm I missing something, or does this CSS technique only allow to have a fixed icon that won't change with the state of the toggle link? As far as I can tell, clicking on the toggle link doesn't change or add any classes, so you'd be left with a static icon that doesn't change to reflect the state of the toggle link. Is there any way to accomplish that?
Comment #11
kapep commentedThere is a class that changes, although I think it's a really badly chosen one.
For published nodes (internally the status field) the classes are like
"fasttoggle fasttoggle-status-node-123-status-1"and for unpublished ones"fasttoggle fasttoggle-status-node-123-status-0".To style these classes we need to use CSS3 substring selectors.
Separating the type (status/sticky/promoted) from the actual status like
"fasttoggle fasttoggle-status-node-123 status-0would result in easier and and more permanent CSS selectors... probably easy to patch.