summaryrefslogtreecommitdiff
path: root/timelinejs_json.tpl.php
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2012-07-31 18:37:58 -0300
committerSilvio <silvio@socioambiental.org>2012-07-31 18:37:58 -0300
commit149097510754e175ab93fc9fa8844999713269fb (patch)
tree7bf00f5a64cf1a65c02fe8fcb55ae286781768a6 /timelinejs_json.tpl.php
parent033c3d884c3c26786c83e00c3ff4c348e1f7a3c6 (diff)
downloadtimelinejs-149097510754e175ab93fc9fa8844999713269fb.tar.gz
timelinejs-149097510754e175ab93fc9fa8844999713269fb.tar.bz2
Starting to code a dynamic timeline
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 } ?>
+ }
+}