Generate link title from node title or use node title as link title

glass.dimly - October 22, 2009 - 15:50
Project:Link
Version:6.x-2.6
Component:Code
Category:feature request
Priority:minor
Assigned:Unassigned
Status:active
Description

Hello,

I'm creating a CCK type that is just a link. Thus, all I really need is a Link Title and a URL. I don't need a node title. In fact, a node title is confusing for the end user.

Therefore, I'd like to be able to just use the node title as the link title.

I also had a moment of confusion on the CCK Display fields page, where I thought that Link was able to do this exact thing, because Link calls link titles just plain old "Title", which normally refers to node titles.

So I experimented a little and found this not to be the case. Not a huge deal.

But either way, it'd be nice if you all changed the CCK display field page to call the link title "Link Title" instead of just plain old "Title", which is mildly confusing.

thanks
glass.dimly

#1

glass.dimly - October 22, 2009 - 16:15
Priority:normal» minor

Found a solution to the first part of my question.

Automatic Nodetitles provides an interface for generating the node Title field automatically and hiding it from the user. You can use a replacement token that is the title of the CCK field which is your link's title field.

See below screenshot for the way that mine worked. This would vary given your CCK field's name, but replacement tokens are listed below, which makes it easy.

AttachmentSize
Screenshot-3.png 39.82 KB
 
 

Drupal is a registered trademark of Dries Buytaert.