Difference between title and description and automatically setting them
tenek - June 3, 2009 - 18:56
| Project: | FileField |
| Version: | 6.x-3.0-rc1 |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I am wondering what differences there are between a title and a description. I ask because I want to make the user to fill in only one field and I'm not sure if the choice between title and description will be relevant in the future.
Second, is there a way to set the title or description to default to being the filename if the user does not enter any information?
Thanks!

#1
Sorry, I also meant to ask if there is a way to automatically set the ALT tag to be equal to the title or description (or the file name if no title or description were entered).
Thanks!
#2
The "description" field is just an unfortunate side-effect of ImageField being built on top of FileField. It actually don't have any effect whatsoever when used on an ImageField, though I've seen people use it as a "Caption" field.
Generally you shouldn't make alt and title tags the same thing, since they're intended for different purposes. However, if you want to override this behavior, you can override the theme_imagefield_formatter_image_plain() function in imagefield_formatter.inc. Just copy the function to your theme's template.php file and rename it to [my_theme_name]_imagefield_formatter_image_plain(), then you can adjust the output however you like.
Sorry it took a while to answer this question (I've answered it several times before), but I'm marking this fixed since it's been a over a month since this was posted. Please open a new issue for any other questions you may have (but please search first).
#3
Automatically closed -- issue fixed for 2 weeks with no activity.