title link to target url

mr3dblond - July 20, 2006 - 05:13
Project:Janode
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

It would be great, if it is an option to change the default behavior for the title url (node url) to the target url.

I tried it by myself, but it didn't work. I add

$node->path = $node->http_link;

to janode_view(), but nothing happens.

#1

scarything - January 17, 2007 - 15:33

I too would like this. I want to create a view/block containing a small list of external links to partner sites. I though Janode would do this but I could find no way of selecting the external link field to show in a view. If the title could link to the external site instead that would suffice.

#2

AjK - January 17, 2007 - 16:04

The problem is that the title "is a link" in teaser view and "not a link" in page view. In teaser view the link points to the post so changing that means the post becomes unreachable. Making the title the link in the post could be done but then it's only rendered in "page mode" (which means it wouldn't work in a block).

I think there are two things here.

  1. Allow Janode to export a block of it's own with say X most recently posted links
  2. Make the Janode module compat with the Views module

(1) is something that could be done in the short term (soon) where (2) would take a little longer (I'd have to read up on the Views API). But I don't think using the title is the correct solution.

If people want (1) above please post here a description of the block they would like and I will make it happen. I want to do (2) when I get some more spare time.

#3

intu.cz - February 16, 2007 - 20:26

Hello, I tried the suggestion with janode module tweaking, but it didn't work. Instead I changed the node.tlp.php and included the following logic:

if ($node->type == 'janode'){print $node->http_link;} else {print $node_url;}

A dirty hack, but does what I need. I use the same condition to hide the "read more" links.

#4

Rob T - May 22, 2007 - 02:46

I followed your logic and it worked. Thanks.

#5

joris.verschueren - May 13, 2009 - 10:37

do i understand you correctly that this allows to make a view displaying "nodetype = janode", and that the resultant list is a list of links to the targets defined in the janode?
that would be great and exactly what I'm looking for.

 
 

Drupal is a registered trademark of Dries Buytaert.