VZ Tabular

Developer

Eli Van Zoeren

3rd Party (Commercial)
Current Version: 1.0.3
Minimum EE Version: 2.6.0
Release Date: May 21, 2016

License Agreement

Buy Now!

$15.00
Qty:

EE Version Support

  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

VZ Tabular is an ExpressionEngine plugin that provides a simple method to output tabular data from the templates. Five output formats are currently supported: CSV, JSON, XML, HTML Table, & Excel. Some possible use-cases include: creating a simple read-only API, endpoints for AJAX operations, and exporting data for transfer to another system.

VZ Tabular is an ExpressionEngine plugin that provides a simple method to output tabular data from the templates. Five ouput formats are currently supported: CSV, JSON, XML, HTML Table, & Excel.

Some possible use-cases include: creating a simple read-only API, endpoints for AJAX operations, and exporting data for transfer to another system. Get creative!

Usage

The tag pair should be wrapped around a looping tag, such as channel:entries or a Grid field. Within that loop, each column for output is wrapped in {col Heading} ... {/col}, with “Heading” being the title for that column. Depending on the output format, you can usually include spaces in the column heading (XML does not support spaces).

If you have problems getting the output you want, turn on Template Debugging. VZ Tabular outputs detailed information about its process, and any problems that occur.

Example:

{exp:vz_tabular:csv}
    {exp:channel:entries channel="news" limit="10"}
        [col Title]{title}[/col]
        [col Publish Date]{entry_date format="%Y-%m-%d"}[/col]
        [col Body]{body_text}[/col]
    {/exp:channel:entries}
{/exp:vz_tabular:csv}

Output Formats

CSV

{exp:vz_tabular:csv} ... {/exp:vz_tabular:csv}

Sample Output

Title,"Publish Date",Body
"Article One",2015-03-17,"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut laoreet libero tincidunt, convallis est feugiat, pretium nibh.</p>"
"Article Two",2015-02-03,"<p>Fusce pretium neque magna, ac feugiat felis volutpat ut. Suspendisse id ullamcorper risus, a sodales nisi.</p>"

Parameters

  • filename - Downloads the output to the user’s computer, rather than displaying it in the browser. Default: none
  • stop_processing - If this is set to yes, no further template processing will occur after the plugin runs. This is useful if you are creating a data-feed and want to ensure that no template debugging info is included on the page. Default: no
  • delimiter - Default: ,.
  • enclosure - Default: .

JSON

{exp:vz_tabular:json pretty="yes"} ... {/exp:vz_tabular:json}

Sample Output

[
    {
        "Title": "Article One",
        "Publish Date": "2015-03-17",
        "Body": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut laoreet libero tincidunt, convallis est feugiat, pretium nibh.<\/p>"
    },
    {
        "Title": "Article Two",
        "Publish Date": "2015-02-03",
        "Body": "<p>Fusce pretium neque magna, ac feugiat felis volutpat ut. Suspendisse id ullamcorper risus, a sodales nisi.<\/p>"
    }
]

Parameters

  • filename - Downloads the output to the user’s computer, rather than displaying it in the browser. Default: none
  • stop_processing - If this is set to yes, no further template processing will occur after the plugin runs. This is useful if you are creating a data-feed and want to ensure that no template debugging info is included on the page. Default: no
  • pretty - Indent the JSON code for easier readability. Requires PHP 5.4+. Default: no.

XML

{exp:vz_tabular:xml} ... {/exp:vz_tabular:xml}

Sample Output

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <element>
    <Title><![CDATA[Article One]]></Title>
    <Publish_Date><![CDATA[2015-03-17]]></Publish_Date>
    <Body><![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut laoreet libero tincidunt, convallis est feugiat, pretium nibh.</p>]]></Body>
  </element>
  <element>
    <Title><![CDATA[Article Two]]></Title>
    <Publish_Date><![CDATA[2015-02-03]]></Publish_Date>
    <Body><![CDATA[<p>Fusce pretium neque magna, ac feugiat felis volutpat ut. Suspendisse id ullamcorper risus, a sodales nisi.</p>]]></Body>
  </element>
</root>

Note: XML does not support spaces in tags, so they are automatically replaced with an underscore.

Parameters

  • filename - Downloads the output to the user’s computer, rather than displaying it in the browser. Default: none
  • stop_processing - If this is set to yes, no further template processing will occur after the plugin runs. This is useful if you are creating a data-feed and want to ensure that no template debugging info is included on the page. Default: no
  • esc_html - If this is set to yes any HTML code in the data will be escaped (i.e. <p>Test</p> would become &lt;p&gt;Test&lt;/p&gt;). Otherwise the HTML tags will be left alone and will be wrapped in a CDATA block. Default: no
  • root - Name of the root element that contains the array of items. Default: root
  • element - Name of the elements representing each row. Default: element
  • pretty - Indent the XML code for easier readability. Default: no

Excel

{exp:vz_tabular:excel filename="spreadsheet.xlsx"} ... {/exp:vz_tabular:excel}

Parameters

  • filename - (Required) Specify the name of the file that is created. The file should have an .xlsx extension. Default: none
  • sheet - Name of the worksheet. Default: Sheet1

Please note that the Excel output option requires PHP to be compiled with Zip support enabled.

HTML Table

{exp:vz_tabular:table} ... {/exp:vz_tabular:table}

Sample Output

<table>
    <thead><tr>
        <th>Title</th>
        <th>Publish Date</th>
        <th>Body</th>
    </tr></thead>
    <tbody
        <tr>
            <td>Article One</td>
            <td>2015-03-17</td>
            <td><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut laoreet libero tincidunt, convallis est feugiat, pretium nibh.</p></td>
        </tr>
        <tr>
            <td>Article Two</td>
            <td>2015-02-03</td>
            <td><p>Fusce pretium neque magna, ac feugiat felis volutpat ut. Suspendisse id ullamcorper risus, a sodales nisi.</p></td>
        </tr>
    </tbody>
</table>

Parameters

  • esc_html - If this is set to yes, any HTML tags in the content will be escaped so the tags display on-screen. Otherwise they will be left alone to render normally. Default: no
  • tab - String to use for indenting the HTML. Set to nothing (tab=”“) for no indentation. Default: four spaces
  • headers - Include a header row with the column names. Default: yes
  • id - Sets an ID on the table element. Default: none
  • class - Sets a class on the table element. Default: none

Support

Please post any questions or problems in the Devot:ee support forum.

VZ Tabular uses a modular adapter system for output formats, so if there is another format that would be useful to you, please tell me!

Changelog

  • 1.0.0: Initial public release.

This entry was created May 13, 2015, 1:09 pm.
This entry was last updated May 22, 2016, 12:43 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

3 Reviews:

Blair Liikala 06.26.16

Blair Liikala
Rating - {addon_rating_average}

Easy, and works!

THEMOST 01.14.16

THEMOST
Rating - {addon_rating_average}

it the best idea to backup and move data from EE

timprint 08.04.15

Rating - {addon_rating_average}

I’ve only used the csv and excel options but they work really well. Very easy to set up. Solid add-on.