In fields section, when configuring field, I am wondering if we can have option to add title attribute to the link when "Link this field to its node" is checked. Thanks

Comments

merlinofchaos’s picture

Probalby not in Views 2; unless what you want is to just make the node title the title attribute; we could probably do that so that it's automatic.

dawehner’s picture

you can achive this on two ways:

first you can rewrite the output as link and add what you want to the link.

OR

you use hook_views_data_alter and change the field handler, which is quite hard :)

liquidcms’s picture

hope this isn't hijacking; but a couple issues with this and i think this post is a feature request as well as a bug:

the "Output as link" option has this: http://screencast.com/t/OTRiNjMxNGYt

there are a couple issues with this:

1. (not sure why everyone gets this wrong), the ALT attribute of an A tag is NOT what gets shown as hover text it is the TITLE attribute.

2. the text entered for the ALT setting here actually isn't even added to the link that gets created as can be seen in this example output:

<span class="field-content"><a href="http://cs6.peter/digital-converter-boxes">Digital Converter Boxes</a><div class="relax"></div></span>

ALT for Only local images are allowed. tags is what is used in place of missing images (TITLE is still the hover) but has very little value for A tags.

I agree with vj0914; would be really nice to have TITLE attribute as an option here (as really only one that makes sense).

liquidcms’s picture

ahh.. ok.. my bad.. sort of

even though the text for this setting says ALT (which is wrong) it actually is inserting the TITLE attribute (which is right).. the only reason i wasn't seeing it is because it doesn't seem to support the Replacement Patterns (i had [title])..

andrewsuth’s picture

@merlinofchaos: Automatic titles for links like you described would be ideal.

dawehner’s picture

This should be possible at the moment, but i'm not 100% sure.

iamjon’s picture

Title: Being able to have title attribute for links when configuring Fields » Make the node title the title attribute for links when configuring Fields
Category: feature » task

I'm marking this as an unassigned task. If anyone would like to role up their sleeves and take it upon themselves to write a patch it would be awesome

iamjon’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
mustanggb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)