User:Rej Maddog/tc/Timeline event

{{#if:  {{{dataname|}}}| var {{{dataname|timeline_data}}} = { // save as a global variable

'dateTimeFormat': 'iso8601',

'events' : [{ }}{{#if:  {{{when|}}}| 'start': '{{#time: c |{{{when}}} }}' }}{{#if: {{{title|}}}|, 'title': '{{{title}}}' }}{{#if: {{{when|}}}|, 'description': '{{{desc}}}' }}{{#if: {{{GGlink|}}}|, 'link': 'http://www.girlgeniusonline.com/comic.php?date={{#time:Ymd|{{{pageid}}}}}' }} __NOWYSIWYG__

Use this template in place of the Timeline event template for the first event. Then use the other template for all the other events and end with the time data end template.

{{User:Rej Maddog/tc/Timeline event }} Use the named variable dataname= to replace the default javascript variable name 'timeline_data'. This allows adding timeline events from different sources. Examples and test: {{User:Rej Maddog/tc/Timeline event when=10000101|
 * when=
 * GGlink=
 * title=
 * desc=
 * dataname=heterodyne_data|
 * GGlink=
 * title=First Heterodyne comes (circa)
 * desc=Ht-rok-din find town; drinks from sacred spring; stays.}}

{{User:Rej Maddog/tc/Timeline event
 * when=10420000
 * GGlink=
 * title=First Castle Heterodyne built
 * desc=Knife builds the first Castle}}

{{User:Rej Maddog/tc/Time data end}}

{{User:Rej Maddog/tc/Timeline event when=10000101|
 * dataname=heterodyne_data|
 * GGlink=
 * title=First Heterodyne comes (circa)
 * desc=Ht-rok-din find town; drinks from sacred spring; stays.}}

{{User:Rej Maddog/tc/Timeline event
 * when=10420000
 * GGlink=
 * title=First Castle Heterodyne built
 * desc=Knife builds the first Castle}}

{{User:Rej Maddog/tc/Time data end}}