Hi,

dont know what im doing. but i can't get a link for the title of the node. it comes up like a link but just links to the baseurl. this is the php code ive put into contemplates:

<div class="node">
<h2><a href="<?php print $node->path ?>"><?php print $title ?></a></h2>
<?php print $node->field_story_photo_text[0]['view'] ?><br>
<?php print $node->field_story_photo_photographer[0]['view'] ?><br>
<?php print check_markup($node->title) ?></br>
<?php print $node->field_story_summary[0]['view'] ?>
<br><br>

Simon

Comments

vm’s picture

not that it's a solution but there is no tag </br> you don't end breaks.
More than likely just a typo.

http://www.w3schools.com/TAGS/tag_br.asp

coreyp_1’s picture

EDIT: never mind...

- Corey

coreyp_1’s picture

Why not just use:

<h2><?php l($title, 'node/'.$node->nid); ?></h2>

- Corey

bobo’s picture

I'm not sure what's going on. I've tried your suggestion and many others, but nothing.

I'm using bluemarine theme (which i use for troubleshooting) and running on apache localhost.

I'm doing this through contemplate, which uses cck.

SImon

bobo’s picture

<h2><a href="<?php print $node->path ?>"><?php print $title ?></a></h2>

Links to nowhere...

bobo’s picture

I didn't realise it at the time, but cleanurl's wasn't set up.

The solution is:

<h2><a href="<?php print '?q=node/'.$node->nid ?>"><?php print $title ?></a></h2>

Thanks for the help everyone,
Simon