Skip to main content
Skip table of contents

Create output tables for online and print deliverables

With this recipe, you can reuse a table representation of various products or product items and their respective properties (for example technical specifications) in order to publish them in a print or web layout.

Context

The product tables are used in censhare PIM. They are created in the respective context, which can be a product, a product family or any other asset. They are used in the Editor for Adobe InDesign documents and need a layout snippet or a layout.

Prerequisites

The workflow for this configuration is carried out in censhare Web. To use the output tables, you need the Editor for Adobe InDesign documents with a valid license or an Online Channel configured in your system.

Introduction

A recipe for a reusable table to add content to web pages or layouts. The tables are created in a root node asset, for example a product or a product family. They aggregate and group properties - for example technical specifications - for multiple product items or products. The tables can be placed in a layout snippet in order to create an output for print brochures; or added to web pages. The table view of the products or product items can be created in Productassets, Product family assets or Product edition assets. In the PIM context, these asset types can be used to group a set of products or product items:

  • Product (with product items)

  • Product family

  • Product edition

  • Product series

  • Product set

The table is created in the same context where the assets themselves are stored. For example, the product items are child assets of the respective product asset. Thus, it is easier and more convenient for users to manage and edit the tables. Instead of placing all products or product items individually in a layout snippet, editors can now drag the complete table to a layout and populate a web page or brochure with the respective content.

This has various advantages. First, for users who are carrying out the data selection, it is not necessary to work in the layout/editing context. Hence, they do not need to know about layout snippets, page layouts, etc. Second, the aggregation of data in a separate table allows for transformations of the data, for example if the raw data need to be enhanced with units, separators or footnotes, or aggregated in a pivot table. Finally, tables and transformations that that you create for one purpose can easily be reused for different items and in other contexts.

As mentioned above, reusable tables are frequently used in censhare PIM. However, they can be defined in any asset type and context. The following table shows the asset structures suitable for product feature tables in censhare PIM.

Asset structures

These asset structures of censhare PIM can be used to create tables that contain specifications for products or product items:

Root node

Child nodes

Table description

Product

product items

The table shows all product items that belong to the product. For example, a bicycle is available in different frame sizes and variations: "Diamond 20 inches", "Diamond 21 inches", "Diamond 22 inches", "Step through 20 inches", "Step through 21 inches", "Step through 22 inches". These are represented as product items.

Product family

products

The table shows all products assigned to the product family. For example, a product family "Laser Printer XPress" is sold in different configurations, which are represented as products: "Laser Printer XPress - black-&-white", "Laser Printer XPress - color", "Laser Printer XPress - WiFi" etc.

Product edition

products

The table shows all products that assigned to an edition. This is just an alternative way of aggregating products. For example, if one and the same product is constantly improved, you can use a product edition to create a table to compare technical specifications: "SmartPhone Cranberry (early 2015)", "SmartPhone Cranberry (ed. 2016/2017)", "SmartPhone Cranberry (late 2017)", etc.

Product series

products

This asset is an alternative for all the above.

Product set

products

This table shows a group of products that are combined and sold as one. For example, you combine various kitchen modules to one product. The table shows specifications like dimensions of the individual modules: "Base cabinet/2 doors", "Base cabinet/1 door", "Base cabinet w/drawers", "Wall cabinet/2 doors", "Wall cabinet/1 door".

Output table

The output table generates a table representation of the products or product items and the respective product properties for each item. This asset is assigned in the parent asset of the items to be shown in the table. For that purpose, the asset types listed above come with a default "Table" tab, where a preview table is shown and the output table is configured.

An output table is a special asset that aggregates the data from the assigned sources and generates an HTML output. The asset type is "Module / Output table". It can be configured in two ways:

Flat table

This is the simplest way to configure an output table. Flat tables show the products or product items assigned to the context asset (columns) and their respective properties (rows). The default orientation can be changed, so that products and product items are shown in the table rows and the properties in the columns. The output table orientation is configured in the Output table generator.

Pivot table

A pivot table is a multi-dimensional table that aggregates and groups data from several tables. A simple example can be obtained from a product that is available in different colors and sizes. Thus, each product item can be characterized in these dimensions (color, size). A flat table would result in a rather large output, especially if many colors and sizes are available. Here, a pivot table is the better solution. It shows the possible combinations of color and size in a matrix (also known as crosstabs).

To create a pivot table, use the "Pivot column X" and "Pivot column Y" widgets in the output table and assign features or macros to these. Each pivot column stands for a flat table. The "X" indicates a horizontal orientation, the "Y" a vertical orientation. For example, assign the "Size" to the "Pivot column X" and color to the "Pivot column Y".

Pivot tables require an especially configured Output table generator. Likewise in flat tables, the table output generator defines the table orientation. Thus, vertical and horizontal orientation of the pivot columns can be inverted.

Assign data sources

In order to add the data source to the table, assign either individual columns or output table groups in the respective widgets. Each data source represents a property, for example the price, or a macro. Macros do some basic formatting or transformation, for example combine two or more properties. This is a handy way to reduce the table size. As an example, a product has two different "Price" properties: a retail price and a wholesale price. Instead of displaying each one in an individual table cell (two rows), use a macro to combine them in a single cell (one row):

Example

Individual table cells:

Retail price:

100$

Wholesale price:

75$

Combined table cells (using a macro):

Price (retail/wholesale):

100$/75$

Instead of assigning individual properties, you can create output table groups and assign these to the "Groups" widget. An output table group is a set of several properties. See the following sections for more information about features, macros and groups:

Columns (features)

This is the simplest way of displaying an asset property in a table cell. For example, to output the weight of a product, censhare takes the value of the property "Weight" and writes it in the respective table cell. Optionally, you can add a localized "Unit output text". This text is independent of any units that are configured in the property. The result would be, for example: "12.2 lbs". To add a unit text, edit the "Properties" widget of the feature and add the desired text in the field "Unit output text".

In order to add a feature column, go to the "Columns" widget of the output table or output table group and click the "+" button in the widget header bar. In the asset chooser dialog, search and select the desired Feature asset and click OK. In the "Columns" widget, use the sorting controls to move the feature to the position where you want it to appear.

In order to add a feature pivot column, go to the "Pivot column X" or "Pivot column Y" widget of the output table and click the "+" button in the widget header bar. In the asset chooser dialog, search and select the desired Feature asset and click OK. In the "Pivot Columns X/Y" widget, use the sorting controls to move the feature to the position where you want it to appear.

Columns (macros)

With macros, censhare provides a more flexible way of outputting values in a table cell. For example, you can join two distinct properties in one table cell. Let us assume that you store two values for the property "Weight". One stores the weight in pounds (lbs), the other stores the weight in kilograms (kg). In your output table, you want both to appear in the same table cell as "lbs/kg". To achieve this, you can use a macro. In the macro asset, you have to add an XPath expression that retrieves and joins the two properties. Here as well, you can add a localized "Unit output text".

In order to add a macro column, go to the "Columns" widget of the output table or output table group and click the "+" button in the widget header bar. In the asset chooser dialog, search and select the desired Macro asset and click OK. In the "Columns" widget, use the sorting controls to move the macro to the position where you want it to appear.

In order to add a macro pivot column, go to the "Pivot column X" or "Pivot column Y" widget of the output table and click the "+" button in the widget header bar. In the asset chooser dialog, search and select the desired Macro asset and click OK. In the "Pivot Columns X/Y" widget, use the sorting controls to move the macro to the position where you want it to appear.

Table output groups

Output table groups allow you to create a more structured table. For example, each group can have a title, a description and a divider. For example, you want to create a table with the product specifications of a series of bicycles. Since there are quite a lot of data in the output table, you group the properties into "Frame", "Gear", "Suspension", "Brakes" and "Accessories", in order to give it a better visualization.

Output table groups are created like output tables, except that you do not have to assign an output table generator. Add features and macros to an output table group. It is also possible to add another table output group in order to create a nested table.

To assign a group to an output table, open the "Output table" asset and go to the "Groups" widget. Click "+" in the widget header. In the asset chooser dialog, search and select the desired group and click OK. In the "Groups" widget, use the sorting controls to move the group to the position where you want it to appear.

Output table groups cannot be used in pivot tables.


Output table generator

The output table generator transforms the table data representation provided by the output table into a media neutral, XML based data model. This standard format can be inserted in HTML or Adobe InCopy (ICML) files and used in web pages or print layouts.

Assign the appropriate output table generator (asset type: Module / Output table / Output table generator) in the Output table asset. Be aware that an output table generator is configured for a specific asset structure. censhare provides a series of master files that can be used in censhare PIM. For other purposes, these can be adapted.

An output table generator store the transformation in an XSL master file. The transformation is executed when you place the context asset with an output table - for example a product family - in a layout or on a web page for the Online channel.

Next steps

Create custom widget configurations for the root node assets (Products, Product families, etc). Once configured, users can generate the configured output formats by placing the assets in a layout or on a web page.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.