I'm trying to use:<?php print $node->field_url[0][view]; ?> in my template to bring up a web url field in cck. Nothing appears. I have tried doing the same with a plain text field with the same results. really can't see what is going on! Help would be vey much appreciated. All my other fields are working fine.
Comments
Comment #1
nevets commentedNot sure, but you at least need
['view']instead of[view]. Also you could do a print_r($node->field_url) to see what is there.Comment #2
sijuwi commentedAppears to be available. If I name a text field URL, it wont work, however if I name that same text field something else like 'test', it will work, however if I name the url field something like, 'weblink' instead of 'URL' it still won't work
Comment #3
Creazion commentedHi sijuwi,
if you use the weburl field you must use the follow syntax to print it out
print $node->field_url['view'];instead of
print $node->field_url[0][view];Comment #4
Folkert commentedshould you not use ?
print $field_url['view']works for me.
Comment #5
karens commentedThe problem is that this module was created back when the cck data structure was different and it never got properly updated. Whoever does the update of this module needs to be sure it handles data consistently with the other modules.
Comment #6
sijuwi commentedThanx a million. This is driving me bananas though. In the beginning I spent ages working out that that fields could be called from
[0][view];not[view];, to find out now I would have to have done some reverse thinking to get the url to work. But I'm grateful anyway for the answer.Comment #7
karens commentedIf you're able to use patches, you might try the patch at http://drupal.org/node/64827.
Comment #8
killes@www.drop.org commentedweb url is only in cvs version.
Comment #9
karens commentedRemoved weburl from cvs, please use link instead (http://drupal.org/project/link). Weburl is not being maintained.
Comment #10
(not verified) commented