Show Options

Table:

Table is a html element which organizes information into rows and column.


Table:

Output:

title1 title2 title3
title1 title2 title3

Code:


<div class="darkout-section">
{% include do-table.html tag="sample" %}
</div>


How to add content:

  • Step1: Navigate to the data file for table in _data > do-table.yml
  • Step2: Add content to the data file as shown in the below example.
do-table:
- table:
  - row: # Use table title on this array
    - data: title1  #  Use data here
    - data: title2
    - data: title3
  - row:
    - data: title1
    - data: title2
    - data: title3
  tag: sample
  • Step3: In the data file tag is a mandatory value. Without using tag table will not be displayed.

  • Step4: In the data file first ‘row’ array will be used for table heading(th).


How to add in page:

  • Step1: Add table to the page using the include statement.
  • Step2: On the page use

    <div class="darkout-section">{% include do-table.html tag="sample" %}</div>

  • Attributes:
    • Tag:
      • Tag is a mandatory attribute without using tag table will not be displayed. (Mandatory)
    • Class:
      • Use additional class here as include variable.