summaryrefslogtreecommitdiff
path: root/timelinejs_json.tpl.php
blob: 68cfcbb90b365400d28efab29c923331ffd0a47f (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
25
26
27
28
29
30
31
32
33
34
35
<?php

  global $base_url;

?>
{
    "timeline":
    {
      "headline":"<?php print $headline; ?>",
        "type":"default",
        "startDate":"<?php print $date; ?>",
        "text":"<?php print $text; ?>",
		"asset":
        {
            "media":"<?php print $media; ?>",
            "credit":"",
            "caption":""
        },
<?php foreach ($events as $event) { ?>
        "date": [
            {
                "startDate":"<?php print $event['date']; ?>",
                "headline":"<?php print $event['headline']; ?>",
                "text":"<?php print $event['text']; ?>",
                "asset":
                {
                    "media":"<?php print $event['media']; ?>",
                    "credit":"",
                    "caption":""
                }
            },
        ]
<?php } ?>
    }
}