cck link field with css spamspan class
johnmullin2003 - January 10, 2009 - 19:34
| Project: | Link |
| Version: | 6.x-2.5 |
| Component: | Documentation |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
Hello, is there a way to set up a Link CCK field that embeds a css class?
(I need to embed spamspan class in all my link field.. ---> class="spamspan" )
I know I can get it setting up a CCK Link field with css class..but any solution with link module?
thanks in advance.
jM

#1
I think that you are aware that you can set a class in the CCK Link field settings.
Can you clarify what the situation is when you can not add a class using the method above?
I'm confused by how your referring to CCK Link Field and Link Module as being different. The CCK Link Field is provided by the Link module (this is currently its sole purpose).
#2
Spamspan is for email. You might want to check out the email field module that has spamspan integration. Although you can use link module to link to email you have to type the mailto: protocol which is more work. And the display formaters would get really crazy trying to put an additional option of using spamspan if it is an email.
#3
Feature request for this?
The issue with the email field is lack a configuration of a title field. It may be a good idea to merge the projects togeather; or rather, an email field based off of link field. The email field has the security features for emails, but lacks the link related features, and visa versa. Also, link is nice for offsite contacts site some people have contact forms while others have emails, so let's one use field for both purposes.
#4
I had another module where I'd find this feature useful; again in the earleir reason it allows people to leave a 'contact' email OR link when making a email field, giving it more flexibility.
Of course, I can make my own formatters for this case, but I'd get messy.
Instead of messing around with link settings, I purpose a a call to an alter display function called after the $link is created. Then a submodule could use widget settings alter to add the setting and alter the display.
Or is there any way in elsewhere without altering the link field? Well, if could add a post render function somehow, but adding it I'm not sure how. Looking content_view_field I don't see how.