Вывод изображений через imagecache. Изменения в Drupal 7

В шестёрке был модуль Imagecache, в семёрке он стал Image style.
В шестёрке для вывода использовался вызов theme-функции imagecache -
print theme($presetname, $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE, $absolute = TRUE);
В семёрке изменилось название theme-функции и изменился её прототип, т.е. передаваемые параметры:

$image_settings = array(
'style_name' => 'thumbnail',
'path' => $record->uri,
'alt' => $record->alt,
'title' => $record->title,
'attributes' => array('class' => 'image'),
'getsize' => FALSE,
);
print theme('image_style', $image_settings);

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
У вас только один правильный ответ - нет