Simple vertical timeline | |
Timelines are useful for presenting chronological information in a way that's easy to understand. Timelines come in horizontal and vertical varieties, and can have nifty animated presentations and so on. The timeline described and demonstrated on this page, though, is a simple one that presents events, each with a date, title, and content, along a vertical axis that also contains markers that separate the events into periods of time.
The data for this timeline implementation is stored in a tracker, and two wiki pages are used to create the display of the information - a page that is the template for each event, and the page for the final display. PluginList can also be used but this demo uses the legacy Trackerlist method. This timeline uses HTML and CSS based on an example at https://codepen.io/brady_wright/pen/NNOvrW . No JavaScript is used, and the CSS for the timeline is in the wiki text in this demo, although it could be provided in the other ways that Tiki supports, such as the theme stylesheet, a custom.css stylesheet, or as custom CSS entered on the Look and Feel admin page. |
The tracker and its fields | |
The tracker has five fields: Time period (type: text field), Event title (text field), Event date (date and time - date picker), Event content (text area), and Timeline item container class (text field).
The Event title is a text field that contains simply the name of the event or timeline item. The Event date field is a Date and Time (Date picker) type. In this demo, there is no need to record hours and minutes, so the option is set to only record the date. Of course if hours and minutes are significant in the timeline, then these should be enabled as a field option, and the field probably should be called "Event time". Event content is the field that contains the text information, images and so on for the event. Like other Tiki text areas, this one can use wiki syntax or HTML if enabled, and can use all activated wiki plugins and so on. It could event contain simply an Include plugin and draw all of its content from a wiki page. Generally speaking, though, timeline event descriptions are fairly short and simple. Timeline item container class is the last field in this tracker, and it is used to style an event's information through the use of a CSS class that is defined in the theme stylesheet or on the Look & Feel page's custom CSS section. For example, in Tiki 13 through 18, the alert or error message boxes use these classes: alert-info, alert-danger, alert-warning, alert-success (see what these look like on https://themes.tiki.org/Sample-Page#Alerts). The tracker itself has these properties that need to be set:
|
The template page (Simple_vertical_timeline_TPL) | |
As mentioned, this timeline uses a wiki page tracker template, Simple_vertical_timeline_TPL, and its name is input in "Template to display an item", appended by "wiki:" to indicate that a wiki page is being used. The template contains the HTML list item ( ) syntax that is used for each event in the timeline. Tracker field ID variables are used that will be replaced with the various information for each event, for each record in the tracker, when the page loads.
After this template page is made, a permission needs to be assigned so it can be used as a tracker template. Click the "More" button at the left side of the page bar's row of buttons, and "Permissions" will display in the "dropup" list. Click "Permissions" and the perms page for this wiki page (titled "Assign permissions to wiki page: Simple_vertical_timeline_TPL") will display. Go to the Wiki section and, for Anonymous users, check the checkbox "Can use the page as a template for a tracker or unified search (tiki_p_use_as_template)". Then click the "Assign" button at the top or bottom of the page. The wiki template page has this content: Copy to clipboard
Copy to clipboard
|
The display page (Simple Vertical Timeline) | |
Copy to clipboard
This wiki page also contains the CSS to style the list. (HTML5 permits CSS for the page to be in the body of the page, so it's fine to put it in wiki pages.) |
Here is the CSS used to create and style the timeline: | |
[-] Copy to clipboard
|
The timeline | |
And here is the finished timeline. If there are any questions or comments, please post in the tiki.org forums.
|
2018 | |
Sun 04 Feb, 2018 |
TikiFest FOSDEM 2018 | |
See https://tiki.org/TikiFest-Fosdem-2018-Whiteboard. |
2017 | |
Mon 09 Oct, 2017 |
TikiFest Japan 2017 | |
Celebrated Tiki's 15th birthday, and discussed the Bootstrap 3 to 4 transition, the Packages feature, and improving the file hierarchy in regard to custom files, etc. |
2016 | |
Tue 23 Aug, 2016 |
TikiFest Hungary 2016 | |
Meetup with old and new friends of the Tiki Community, work together on Tiki marketing and branding (and possibly some bugfixing, yay!) and have a great time in one of the most famous cities of Europe. Mon 01 Feb, 2016 |
TikiFest2016 Brussels Fosdem | |
Topics / Activities
(This timeline item has an "alert-info" CSS container class applied.) |