I'm using the views and taxonomy modules to generate lists of my content, what I want to do is that some of those list links instead of going to a node, to go to an external link. I've created a content type with the link field, and it works well, but the only problem is that when you get the taxonomy list and you click on the title of this link it takes you to the node where you can access the link. Is there some way so that you can just click a title and it takes you to an external link. What I need is to have list generated from taxonomies that have links to nodes I posted under that category and also external links that I post under that category, but I want those external links to accessible just by clicking on the title of the link. I hope I explained this well and that someone could help me out. Thanks to anyone that posts a reply.

Comments

ipwa’s picture

is there really no one that knows how to do this? any advice would be much appreciated

Nicolas
-------------------------

craigdurling’s picture

I see you posted this in June. Have you had any luck with this since then? I'd like to do the same thing on a site I'm developing. I'm considering using drupal but this is something I would need to clear up before proceeding.

summit’s picture

Hi,

I snapped away somewhere the following snippet, which leads to the links directly. It is drupal 5.

<?php
$nlimit = 15;
$result = db_query(db_rewrite_sql("SELECT n.title, w.lid, n.nid
FROM {node} n
  INNER JOIN {links_node} wn ON n.nid = wn.nid
  INNER JOIN {links} w ON wn.lid = w.lid
WHERE n.type = 'weblink'
  AND n.status = 1
  AND n.moderate = 0
ORDER BY n.created DESC
LIMIT $nlimit"));

while ($node = db_fetch_object($result)) {
  $items[] = l($node->title, 'links/goto/' . $node->nid . '/');
}
$output .= theme('item_list', $items);
return $output;
?>

Does anyone know if there is maybe a views field which also leads to the direct link?

greetings,
Martijn

tanoshimi’s picture

Thanks for the snippet - really helpful.

Still no views support for this?

summit’s picture

Hi,

No, nobody has replyed with a views-supported feature for this yet.

Greetings,
Martijn
www.gratis-informatie.nl