1
我的內容類型爲「company_profile」,圖像字段名稱爲「field_cp_logo」。現在,我使用Views CustomField選項將imagecache預設名稱打印爲「jobsearch_company」。我正在使用下面的代碼,但它沒有向我顯示任何內容。任何幫助在這裏讚賞。在視圖中使用Imagecache打印圖像CustomField
<?php
$fid = db_fetch_object(db_query("SELECT f.field_cp_logo_fid FROM {content_type_company_profile} f WHERE nid = %d", $n_nid));
$img_path = db_fetch_object(db_query("SELECT f.filepath FROM {files} f WHERE fid = %d", $fid->field_cp_logo_fid));
$img_path = file_create_path($img_path->filepath);
$image = theme('imagecache', 'jobsearch_company', $img_path);
print $image;
?>
http://chat.stackoverflow.com/rooms/70243/farsi-programming-discussion – Kasramvd 2015-02-04 22:10:29