blob: 60b88c2419d5ed76037b076e2b51e379484ab1d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
{
"startDate":"<?php print strftime('%Y,%m,%d', strtotime($event->field_date['und'][0]['value'])); ?>",
"headline":"<?php print $event->title; ?>",
"text":"<?php print timelinejs_strip($event->body['und'][0]['value']); ?>",
<?php if (isset($event->tag) && $event->tag != FALSE) { ?>
"tag":"<?php print $event->tag->name; ?>",
<?php } ?>
"asset":
{
<?php if (!empty($event->field_embed)) { ?>
"media":"<?php print file_create_url($event->field_embed['und'][0]['uri']); ?>",
"credit":"",
"caption":""
<?php } else if (!empty($event->field_image)) { ?>
"media":"<?php print file_create_url($event->field_image['und'][0]['uri']); ?>",
"credit":"<?php if (isset($event->field_image['und'][0]['alt'])) { print timelinejs_strip($event->field_image['und'][0]['alt']); } ?>",
"caption":"<?php if (isset($event->field_image['und'][0]['title'])) { print timelinejs_strip($event->field_image['und'][0]['title']); } ?>"
<?php } else { ?>
"media":"",
"credit":"",
"caption":""
<?php } ?>
}
}
|