https://github.com/towardstudio/csvtotable
Plugin to create a table from a CSV
https://github.com/towardstudio/csvtotable
Last synced: 4 months ago
JSON representation
Plugin to create a table from a CSV
- Host: GitHub
- URL: https://github.com/towardstudio/csvtotable
- Owner: towardstudio
- License: other
- Created: 2022-04-12T15:09:55.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-30T08:49:13.000Z (about 2 years ago)
- Last Synced: 2026-02-17T02:53:49.245Z (4 months ago)
- Language: PHP
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# CSV to Table plugin for Craft CMS 5.x
Create a table from a CSV
## Requirements
This plugin requires Craft CMS 5 or later.
## Installation
To install the plugin, follow these instructions.
1. Open your terminal and go to your Craft project:
```
cd /path/to/project/craft
```
2. Then tell Composer to load the plugin:
```
composer require towardstudio/csvtotable
```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for CSV to Table.
## Settings
In a Dev environment there is a control panel navigation item which will direct you to the plugin settings.
Within the settings you can set classes on each of the table elements to give a global style.
## Template
```
{{ csvToTable(entry.csvTable) }}
```
To display the table, you can pass the Asset into a function. This will automatically change the data into a table format.
## Additional Parameter
If you don't want your table to display with a `` you can pass an additional parameter of `false` into the function which will remove the `` option.
```
{{ csvToTable(entry.csvTable, false) }}
```
[Toward Disclaimer](https://github.com/towardstudio/toward-open-source-disclaimer)
Brought to you by [Toward](https://toward.studio)