Answer the question
In order to leave comments, you need to log in
How to display $view->result?
It is necessary to programmatically display one field from views in the Calendar module template.
print_r($view->result) gives the following:
Array
(
[0] => stdClass Object
(
[field_data_event_calendar_date_delta] => 0
[date_id_event_calendar_date] => 9
[date_delta_event_calendar_date] => 0
[node_title] => 2015-07-28 00:00:00
[nid] => 9
[field_data_event_calendar_date_event_calendar_date_value] => 2015-07-28 00:00:00
[field_data_event_calendar_date_node_entity_type] => node
[_field_data] => Array
(
[nid] => Array
(
[entity_type] => node
[entity] => stdClass Object
(
[vid] => 9
[uid] => 1
[title] => 2015-07-28 00:00:00
[log] =>
[status] => 1
[comment] => 1
[promote] => 0
[sticky] => 0
[nid] => 9
[type] => event_calendar
[language] => ru
[created] => 1437909391
[changed] => 1437909391
[tnid] => 0
[translate] => 0
[revision_timestamp] => 1437909391
[revision_uid] => 1
[event_calendar_status] => Array
(
[und] => Array
(
[0] => Array
(
[tid] => 7
)
)
)
[event_calendar_date] => Array
(
[und] => Array
(
[0] => Array
(
[value] => 2015-07-28 00:00:00
[timezone] => Europe/Moscow
[timezone_db] => Europe/Moscow
[date_type] => datetime
)
)
)
[rdf_mapping] => Array
(
[rdftype] => Array
(
[0] => sioc:Item
[1] => foaf:Document
)
[title] => Array
(
[predicates] => Array
(
[0] => dc:title
)
)
[created] => Array
(
[predicates] => Array
(
[0] => dc:date
[1] => dc:created
)
[datatype] => xsd:dateTime
[callback] => date_iso8601
)
[changed] => Array
(
[predicates] => Array
(
[0] => dc:modified
)
[datatype] => xsd:dateTime
[callback] => date_iso8601
)
[body] => Array
(
[predicates] => Array
(
[0] => content:encoded
)
)
[uid] => Array
(
[predicates] => Array
(
[0] => sioc:has_creator
)
[type] => rel
)
[name] => Array
(
[predicates] => Array
(
[0] => foaf:name
)
)
[comment_count] => Array
(
[predicates] => Array
(
[0] => sioc:num_replies
)
[datatype] => xsd:integer
)
[last_activity] => Array
(
[predicates] => Array
(
[0] => sioc:last_activity_date
)
[datatype] => xsd:dateTime
[callback] => date_iso8601
)
)
[cid] => 0
[last_comment_timestamp] => 1437909391
[last_comment_name] =>
[last_comment_uid] => 1
[comment_count] => 0
[name] => admin
[picture] => 0
[data] => b:0;
)
)
)
[field_event_calendar_date] => Array
(
[0] => Array
(
[rendered] => Array
(
[#markup] => <span class="date-display-single" property="dc:date" datatype="xsd:dateTime" content="2015-07-28T00:00:00+03:00">вторник, июля 28, 2015</span>
[#access] => 1
)
[raw] => Array
(
[value] => 2015-07-28 00:00:00
[timezone] => Europe/Moscow
[timezone_db] => Europe/Moscow
[date_type] => datetime
)
)
)
)
)
<?php print $view->result[0][_field_data][nid][entity][event_calendar_status][und][0][tid]; ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question