Use imagefield description as slidetext

In case you enabled the description of the image field and want to use this description e.g. for the slide_text you can use the code below.

//  add slide_text variable from imagefield description
if (isset($result->[image_field]_data)) {
  if (isset($data['description'])) {
    $slider_items[$key1]['slide_text'] = $data['description'];

  1. Find the CCK generated [***image_field***] name with the debug lines
  2. Change [***image_field***] with the CCK generated name


In this case only the imagefield is added in the view. Automatically also the serialized data of the imagefield is added. To get the description from the serialized data the data has to be unserialized.