[title] token coming up blank as link title in views block

tanoshimi - February 7, 2008 - 17:19
Project:Link
Version:5.x-2.1
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

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.

<?php
<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>
?>

#1

TheonH - March 4, 2008 - 06:10

I'm having the same issue.

#2

patchak - March 13, 2008 - 17:27

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

#3

McGo - March 27, 2008 - 15:50

Same problem here. Is there any solution for that?

#4

quicksketch - March 31, 2008 - 07:38
Status:active» active (needs more info)

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).

AttachmentSize
Link Token Configuration10.7 KB
Link Title View22.06 KB

#5

blairski - April 21, 2008 - 09:55

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..

#6

NukeHavoc - April 25, 2008 - 13:08

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

#7

NukeHavoc - April 27, 2008 - 18:45

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

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

#8

quicksketch - June 6, 2008 - 03:14
Status:active (needs more info)» duplicate

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

 
 

Drupal is a registered trademark of Dries Buytaert.