Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This project is not covered by Drupal’s security advisory policy.
Developer API for generating and rendering data using the TimelineJS3 library.
E.g.
use Drupal\timelinejs_api\TimelineData;
use Drupal\timelinejs_api\TimelineSlide;
use Drupal\timelinejs_api\TimelineEra;
use Drupal\timelinejs_api\TimelineTitle;
use Drupal\timelinejs_api\Timelinerenderer;
$data = new TimelineData();
$date = TimelineDate::createFromDateString('now');
$text = new TimelineText('Headline text', 'Long text');
$event = new TimelineSlide($date, $text, 'My Group');
$data->addEvent($event);
// A URL to be AJAX loaded can also be passed instead of data object.
// The callback should return the same data as you'd get by calling
// TimelineData::toArray(). So data should be created in the same way
// and returned from the callback as JSON.
$renderer = new TimelineRenderer('unique-id', $data);
// Drupal render array with correct timeline JS data, #attached libraries,
// and markup.
$build = $renderer->render();
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Module categories: Site Structure
- 4 sites report using this module
- Created by damiankloip on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
7.x-1.0-beta1
released 21 December 2015
Works with Drupal: 7.x
✓ Recommended by the project’s maintainer.