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

Comments

sun’s picture

Just in case: I didn't know whether $attributes can actually contain a 'class' key at all, so adding the class might not be necessary.

quicksketch’s picture

Status: Needs review » Needs work

I'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"?

sun’s picture

Status: Needs work » Needs review
StatusFileSize
new1.41 KB
sun’s picture

sun’s picture

now with outsourced _link_field_formatter() helper function.

quicksketch’s picture

StatusFileSize
new1.78 KB
new2.76 KB

Here'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.

quicksketch’s picture

Status: Needs review » Fixed

Got the okay from sun and committed. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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