私はこの配列を持っています:
stdClass Object
(
[nid] => 218
[node_title] => This is my title text
[field_data_field_slider_image_delta] => 0
[field_data_field_slider_image_language] => und
[field_data_field_slider_image_bundle] => slider
[field_data_field_slider_image_field_slider_image_fid] => 1278
[field_data_field_slider_image_field_slider_image_alt] =>
[field_data_field_slider_image_field_slider_image_title] =>
[field_data_field_slider_image_field_slider_image_width] => 1180
[field_data_field_slider_image_field_slider_image_height] => 352
[node_created] => 1334267878
[field_data_field_slider_link_node_entity_type] => node
[field_data_body_node_entity_type] => node
[field_data_field_slider_image_node_entity_type] => node
[_field_data] => Array
(
[nid] => Array
(
[entity_type] => node
[entity] => stdClass Object
(
[vid] => 218
[uid] => 1
[title] => This is my title text
[log] =>
[status] => 1
[comment] => 1
[promote] => 1
[sticky] => 0
[nid] => 218
[type] => slider
[language] => en
[created] => 1334267878
[changed] => 1334268388
[tnid] => 0
[translate] => 0
[revision_timestamp] => 1334268388
[revision_uid] => 1
[body] => Array
(
[und] => Array
(
[0] => Array
(
[value] => <p>This is my body text</p>
[summary] =>
[format] => full_html
[safe_value] => <p>This is my body text</p>
[safe_summary] =>
)
)
)
[field_slider_image] => Array
(
[und] => Array
(
[0] => Array
(
[fid] => 1278
[alt] =>
[title] =>
[width] => 1180
[height] => 352
[uid] => 1
[filename] => slider-d.jpg
[uri] => public://images/slider-d.jpg
[filemime] => image/jpeg
[filesize] => 103135
[status] => 1
[timestamp] => 1334267878
[type] => image
)
)
)
[field_slider_link] => Array
(
[und] => Array
(
[0] => Array
(
[url] => http://mydomain.com/my/link
[title] =>
[attributes] => Array
(
)
)
)
)
[cid] => 0
[last_comment_timestamp] => 1334267878
[last_comment_name] =>
[last_comment_uid] => 1
[comment_count] => 0
[name] => admin
[picture] => 1242
[data] => a:2:{s:7:"contact";i:0;s:7:"overlay";i:1;}
)
)
)
[field_field_slider_link] => Array
(
[0] => Array
(
[rendered] => Array
(
[#markup] => http://mydomain.com/my/link
[#access] => 1
)
[raw] => Array
(
[url] => http://mydomain.com/my/link
[title] => http://mydomain.com/my/link
[attributes] => Array
(
)
[display_url] => http://mydomain.com/my/link
)
)
)
[field_body] => Array
(
[0] => Array
(
[rendered] => Array
(
[#markup] => <p>This is my body text</p>
[#access] => 1
[#type] => markup
[#pre_render] => Array
(
[0] => drupal_pre_render_markup
[1] => ctools_dependent_pre_render
)
[#children] => <p>This is my body text</p>
[#printed] => 1
)
[raw] => Array
(
[value] => <p>This is my body text</p>
[summary] =>
[format] => full_html
[safe_value] => <p>This is my body text</p>
[safe_summary] =>
[#children] =>
[#printed] => 1
)
[#children] => <p>This is my body text</p>
[#printed] => 1
)
[#children] => <p>This is my body text</p>
[#printed] => 1
)
[field_field_slider_image] => Array
(
[0] => Array
(
[rendered] => Array
(
[#theme] => image_formatter
[#item] => Array
(
[fid] => 1278
[alt] =>
[title] =>
[width] => 1180
[height] => 352
[uid] => 1
[filename] => slider-d.jpg
[uri] => public://images/slider-d.jpg
[filemime] => image/jpeg
[filesize] => 103135
[status] => 1
[timestamp] => 1334267878
[type] => image
)
[#image_style] => featured_slideshow
[#path] =>
[#access] => 1
)
[raw] => Array
(
[fid] => 1278
[alt] =>
[title] =>
[width] => 1180
[height] => 352
[uid] => 1
[filename] => slider-d.jpg
[uri] => public://images/slider-d.jpg
[filemime] => image/jpeg
[filesize] => 103135
[status] => 1
[timestamp] => 1334267878
[type] => image
)
)
)
)
そして私は[url]
値を取得する必要があります(これはhttp://mydomain.com/my/link
)
私はチュートリアルに従おうとしましたが、これで終わりました:
print $row->field_field_slider_link[0]['raw']['url']
しかし、私はこのエラーメッセージを受け取ります:
Notice: Undefined offset: 0 in include() (line 57 of /var/www/vhosts/clientname/public_html/sites/all/themes/custom/templates/views/ff-nivo-slider/views-view-fields--ff-nivo-slider.tpl.php).
誰かが私がここで間違っていることを見ることができますか?
ありがとうC