I'd like to switch my neatline timeline to display by year and decade rather than month and year. I did this successfully with the SIMILE widget on a basic html page. Where is the code that I need to change in Omeka? I'm assuming it's somewhere in the neatline plugin on my server, but I don't want to mess anything up!
You'll need to edit the intervalUnit parameters for the two bands, in the NeatlineTime/views/shared/javascripts/neatline-time-scripts.js file. Changing the top band to Timeline.DateTime.YEAR
and the bottom band to Timeline.DateTime.DECADE
should work:
intervalUnit: Timeline.DateTime.YEAR,
...
intervalUnit: Timeline.DateTime.DECADE,
You should be able to copy this file to your theme's javascripts directory, and edit from there, to avoid editing the plugin files (then having to edit them again if you need to upgrade the plugin). Editing this will change the interval for all your timelines.
In a future release, we've considered allowing users to choose the interview on a per-timeline basis. There's an issue for this on our Github issue tracker. If you have any thoughts about this, feel free to share them there!
I tried this and it didn't work.
Sorry, kkeramidas, I incorrectly said you coudl put the updated javascript file in your theme's javascripts
directory. Actually, you need to create a directory called neatline-time
in your theme, then a javascripts
directory in there, THEN put the updated neatline-time-scripts.js
file in there. So, the path to the new file should be:
your-theme/neatline-time/javascripts/neatline-time-scripts.js
Try that and see if it works.
Great, thanks, that helped