Hi, I've just started to use drupal about 2 weeks ago (and PHP) and am getting up to speed, but I feel like a hack. What I want is the ability to have the title of a node link to something other than the node. eg On the front page I'd have an anouncement and I'd like the title to link to taxonomy menu associated to the anouncement not the node of the anouncement.
Now I have come up with a way to do this but it just feels like a hack! I'm sure its been done but my searches have failed to find it :( anyhow this is what I've done.
Say I want to link the title "New reviews just posted" to the URL "Reviews" I'd use this as the title when creating content:
nodelink:Reviews New reviews just posted
Then in the template.php (I'm using phpTemplate) file in the phptemplate_node() function, I'd parse the title for the key word nodelink: and reassign title and url in a similar way to the standalone bit of test code below.
There must be a more elegant solution out there! Any pointers
(maybe this is a theme Q , but it seemed more suited to here)
Note:this is just stand alone proof of concept stuff, not what I've added to template.php!
<?php
$str = "nodelink:Review This is a title";
$str2 = "nodelink: http://drupal.org This is a title";
$str3 = "this is only a title";
$teststr=$str1;
if (strstr($teststr,"nodelink:")){
$pos1=strpos($teststr,":");