summaryrefslogtreecommitdiff
path: root/timelinejs_json.tpl.php
diff options
context:
space:
mode:
Diffstat (limited to 'timelinejs_json.tpl.php')
-rw-r--r--timelinejs_json.tpl.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/timelinejs_json.tpl.php b/timelinejs_json.tpl.php
new file mode 100644
index 0000000..68cfcbb
--- /dev/null
+++ b/timelinejs_json.tpl.php
@@ -0,0 +1,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 } ?>
+ }
+}