Changing a variable prior to print in D7
Posted by wernerglinka on April 17, 2011 at 1:03am
I am getting my feet wet with D7 and came up against something that I haven't been able to Google yet. I am using views to get a list of variables in a custom block. One variable is:
$fields['field_main_image_large_title']->content
If I want to print out this variable I use:
print render $fields['field_main_image_large_title']->content;
Now I like to use this field as part of a url in a link. In D6 I'd just do:
<a href='my/url/<?php print $fields['field_main_image_large_title']->content; ?>'>myLinkTitle</a>