Advertisement
Sadchenko

Программный вывод изображений в Drupal 6, 7

Jun 15th, 2016
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. //Drupal 6
  2. echo imagecache_create_path(product, $photos[0]['filepath']); //Вывод пути к файлу
  3. echo theme('imagecache', 'preset_namespace', $image_filepath, $alt, $title, $attributes); //Стилизация через ImageCache
  4.  
  5. //Drupal 7
  6. echo render(file_create_url($content['field_name'][0]['#item']['uri'])) //Вывод пути к файлу
  7. echo image_style_url('*name_preset*', $content['*field_name*'][0]['#item']['uri']) //Стилизайция через ImageStyle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement