Closed (fixed)
Project:
Link
Version:
5.x-2.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Jun 2008 at 17:37 UTC
Updated:
20 Jun 2008 at 04:55 UTC
Jump to comment: Most recent file
Attached patch adds a formatter to display the label of a link and the link itself separately.
For example:
Look at cool stuff on example site
http://www.example.com
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | link_separate_formatter.patch | 2.76 KB | quicksketch |
| #6 | link_separate_formatter6.patch | 1.78 KB | quicksketch |
| #5 | link-DRUPAL-5.label-separate-formatter.patch | 2.8 KB | sun |
| #4 | link-DRUPAL-5.label-separate-formatter.patch | 1.99 KB | sun |
| #3 | link-DRUPAL-5.label-separate-formatter.patch | 1.41 KB | sun |
Comments
Comment #1
sunJust in case: I didn't know whether $attributes can actually contain a 'class' key at all, so adding the class might not be necessary.
Comment #2
quicksketchI'd prefer to wrap the two associated fields in a DIV with the class placed on it alone. Also, how about "Separate title and URL" as the name of the formatter rather than "Label, as link with separate label"?
Comment #3
sunComment #4
sunComment #5
sunnow with outsourced _link_field_formatter() helper function.
Comment #6
quicksketchHere's a version that makes a few functional changes:
- If no title is available, the title DIV is not printed out
- Adds $item parameter to the helper function so that something will print out :)
- Renames the formatter to "separate", since it's the title and URL that are separate, not the label. Plus it makes for shorter formatter function names in D6.
And a D6 version.
Comment #7
quicksketchGot the okay from sun and committed. Thanks!
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.