Reputation: 2289
I've created custom theme look for one of my fields in views, and added field field_field_services_text_link[0]['rendered']['#markup'];?>. I tried to do same with my another image field, but it doesnt works. I used field_field_services_image[0]['rendered']]['uri']; ?>, but something wrong in this code. Any ideas how to solve it?
Upvotes: 0
Views: 1362
Reputation: 2015
To troubleshoot this, perhaps the following would help. Paste it in your theme file instead of what you have above
<?php print_r($field_field_services_image); ?>
the print_r function will show you the structure of the array ($field_field_services_image) you're trying to work with and can show you whether the structure is exactly as you'd expect. Perhaps there's a problem somewhere in the [0]['rendered']... portion, and you can check that. It may be empty somewhere, etc...
Upvotes: 1
Reputation: 2491
You could always see whats being output with a var dump or even better, the devel module.
Upvotes: 0