summaryrefslogtreecommitdiff
path: root/timelinejs_json_event.tpl.php
blob: 22a3b5d954baba70c5c392eba9e5a3554f1f70c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
            {
                "startDate":"<?php print strftime('%Y,%m,%d', strtotime($event->field_date['und'][0]['value'])); ?>",
                "headline":"<?php print $event->title; ?>",
                "text":"<?php print str_replace('"', '&quot;', $event->body['und'][0]['value']); ?>",
                "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":"",
                    "caption":""
<?php } else { ?>
                    "media":"",
                    "credit":"",
                    "caption":""
<?php } ?>
                }
            }