Hi All,

Can anyone please tell me if there's a simple way to achieve a non editable link (by users creating content) to the authors profile page similar to the standard 'post details' but as a CCK field so that I can place it exactly where i need it, between other options.

I've had a look at the CCK User Reference option but this offers a Select list, Check boxes/radio buttons and an Autocomplete text field and can't see how I can set this to automatically default to the user creating the content and then 'hide' the option on the create and edit pages

The CCK 'Link' module appears not to allow the use of dynamics in the url

The 'Custom Links' module isn't actually a CCK field so I can't use that (as far as I can tell, as it comes without any documentation)

Any help would be greatly appreciated.

Thanks :D

Comments

WorldFallz’s picture

Use a computed field-- Depending on exactly how you want to format the link, you could use something like the following in the computed field code box:

$node_field[0]['value'] = l($node->name, 'user/' . $node->uid);
axel pressbutton’s picture

WorldFallz to the rescue AGAIN!!! I really can't thank you enough for all the help you've given on this and previous requests for help :)

WorldFallz’s picture

lol, happy to help! ;-)

axel pressbutton’s picture

Hi,

I've just tried to replicate this code on another content type but it doesn't work for some reason (i just tried to add it via the "add existing field" option under "manage fields"....seeing as it was already setup and working for the other content types).

Does the code need to change if the content type uses a modified and renamed node.tpl.php template?

The one I created is called node-exercise_video.tpl.php and has only been slightly modified for the purposes of using the FlashVideo module without the [video] tag (as is advised).

Thanks again for any help.

axel pressbutton’s picture

Sorry, it's been a long project and a long day - I'd forgotten to resave the content after adding the field retrospectively so it hadn't taken effect

02:17 here...must be time for bed :(