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 |
Jump to:
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
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
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) 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
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
I followed your logic and it worked. Thanks.
#5
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.