I have defined a content type 'weblink' which has title, body, and one link field called 'url'.
In the url widget settings screen, I have set the Link Title: to be static title, using the tokens [nid] [title] because I want the link field to be displayed with the title of the node which contains it...

Then I have created a view block, list type, with the only field being Link: url field, with option 'Default, as link with title'

When I enable the block, I see the list of links, and the urls are all correct, but the text of the links themselves is just the [nid] of the node containing the link - the [title] never gets displayed. I've also tried with [title-raw] with no success, although [nid], and global tokens like [user-name] all work...

I'm using v1.10 of token. I also have the websnapr preview module enabled on the links.

The html generated from the view is as follows - nothing is ever returned by the [title] token. (the 1408 etc. are the nids of the nodes in question)

Any help would be much appreciated!

t.

<div id="block-views-view_links" class="clear-block block block-views">
  <h2>Useful Links</h2>
  <div class="content"><div class='view view-view-links'><div class='view-content view-content-view-links'><div class="item-list"><ul><li><div class='view-item view-item-view-links'><div class='view-field view-data-node-data-field-url-field-url-url'><a href="http://www.bbc.co.uk/health/kids" class="websnapr">1408 </a></div></div>
</li><li><div class='view-item view-item-view-links'><div class='view-field view-data-node-data-field-url-field-url-url'><a href="http://www.bbc.co.uk/teens" class="websnapr">1409 </a></div></div>
</li><li><div class='view-item view-item-view-links'><div class='view-field view-data-node-data-field-url-field-url-url'><a href="http://www.mindbodysoul.gov.uk" class="websnapr">1410 </a></div></div></li></ul></div></div></div>
</div>
</div>
        </div>

Comments

TheonH’s picture

I'm having the same issue.

patchak’s picture

I too have the same problem. The title token will just not appear into a view, list or table... I've resigned myself not to use this cause I need to launch the site this week, but I confirm this is a bug with all most recent cck + views, etc...

Patchak

McGo’s picture

Same problem here. Is there any solution for that?

quicksketch’s picture

Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new10.7 KB
new22.06 KB

I can't reproduce this issue. I'm using:

Drupal 5.7
Views 1.6
Token 1.10
Link 2.1

Though I'm using [title-raw], which I believe is the correct token to use in this case (since it gets run through the l() function, which does the cleaning there).

blairski’s picture

I am having the same problem.

I am using the same versions as Quicksketch. I've tried various settings on the CCK Link module and Views with no success.
I'll keep poking around..

NukeHavoc’s picture

I've run into the same sort of problem with Link CCK and tokens in both Blocks and Views. In my case, I've got a simple "Link" content type that looks like this:

Title: My Great Site
Web Address Title: [title]
Web Address Link: http://www.mygreatsite.com

If I'm looking at the node, then this works; the [title] token is replaced by the node title. However, if I'm looking at a View or a Block, "Web Address" appears blank. The only exception is when I'm on the node for that particular link; in that case the title appears properly in the Block.

I'm assuming that it's not supposed to work this way, and that it's a problem with CCK's implementation of tokens.

I'm using:

Drupal 5.7
Token 5.x-1.10
CCK 5.x-1.6-1
Link 5.x-2.1

NukeHavoc’s picture

I've posted a detailed write-up about this problem to the Token support queue:

http://drupal.org/node/213548#comment-822926

quicksketch’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Yep, this was fixed a while ago. Read the issue NukeHavoc posted in #7.