I worked with the patch for the 6.x version of link to add support for a description field. I don't know how to write the database update script, but if you install from scratch it will create the new column for a description. Also, if you add a description to a link it wraps it as a definition list. I don't know how to stop the fields API from wrapping divs around the items at the module level, I just created a template suggestion in my theme where I can clean out the divs and just print out a nice definition list.

There is also no views integration yet, or even an option to turn the field on. I also ran it through coder until it came through with no errors, so a lot of the changes are that.

in summary, what needs work:

  • schema update code
  • Is definition lists the right solution?
  • views integration
  • tests would need to be updated

This is my first patch ever, any help, advice, feedback would be appreciated.

CommentFileSizeAuthor
link7description.patch12.85 KBmellenger
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcfiala’s picture

I appreciate the patch! I just wanted to put in a note that this is a somewhat slowly moving project, and although I plan to put some time in this weekend to work on the link module, I probably won't look at it until then.

I'm not entirely sure of the answers to the questions you're putting forth yourself, but it's a good chance for both of us to learn.

mcurry’s picture

subscribe

Patroclas’s picture

It would be really good to have a description field available. Dare I ask if any progress is likely on this?

dqd’s picture

@ Patroclas: let me say thanks at first for trying to provide a patch to get link description.

Is it ok for you to start discussing, if it is really needed sticking on link module?

D7 has much more optimized workflow and more to offer from scratch than 6, and should be checked twice for any options. Many who come from D6 didn't realize the more and more modular architecture of D7.

Did you ever had a look on field collection for example? It combines fields into ONE entity. And field collection table? And wouldn't it be awesome to have the link description individually at hand to collect them without the other columns in certain circumstances, or to place them somewhre else? Thats what I call "modular".

I had a long discussion here with others about images and image description. Finally it turned out, that we prefer an extra field for that and group it. Just in case we want to reuse the value somewhere else. The strength of Drupal and its development more and more into a toolbox framework direction makes it possible to combine mostly everything and group it again. This should be preferred for the most possible flexibility.

Another column in a field would be the other direction around. D7 together with display suite (ds), field_group, link, date, field_collection and some more didn't let you miss anything in any complex node display concept. To bind a description field sticky to a link data row isn't really a good code concept.

let me know what you think ...

dqd’s picture

Status: Needs work » Closed (works as designed)
Julia C’s picture

Issue summary: View changes

I am trying to apply this patch to Link module version 7.x-1.2 using git.
When using the git command "git apply [patchname].patch" I get the following error message:

"fatal: git diff header lacks filename information when removing 1 leading pathname component (line 5)."

I'm a newbie to git...can anybody help?

Thanks!

jcfiala’s picture

Julia, generally I suggest using something like the https://drupal.org/project/field_group module than expanding field to do more fields. I've had some really interesting results from using the Field Group module along with, say, the Field Group Table module.