training priint:comet

Transcription

training priint:comet
TRAINING PRIINT:COMET
TABLEMODULE
© 2010 WERK II Medien- und Informationsgesellschaft mbH
Tablemodule
© 2010 WERK II Medien- und Informationsgesellschaft mbH
2
Tablemodul
!   Target: Build re-usable templates for light and middle complex tables.!
!   User can change the styles of the table template without programming!
!   User can build own templates with a set of pre-configures methods!
!
Concept: Create a skeleton table in InDesgin. !
!
Assign some methods to this skeleton that set the rules how the skeleten
will expand if it is linked to an object like a product group.!
!
Assign additional (hidden) informations (like object keys) to tables and
rows, columns and cells to control the build of the table.
© 2010 WERK II Medien- und Informationsgesellschaft mbH
3
Table with variable number of rows and fix number of
columns
© 2010 WERK II Medien- und Informationsgesellschaft mbH
4
Tablemodule
! Building tables with variable numbers of rows and fix numbers of columns!
Columns
fix number of columns
Rows
n number of rows
© 2010 WERK II Medien- und Informationsgesellschaft mbH
5
Tablemodule
! Example: Building a pricelist from a chapter!
© 2010 WERK II Medien- und Informationsgesellschaft mbH
Chapter
select a chapter as the
starpoint
6
Tablemodule: Skeleton Table
!   The base of a table template is a skeleton table!
!   The skeleton table usually has a concistend part like a header and a dynamic part
that will be duplicated with all ist settings (fills,strokes, etc) as much as needed to
display the data !
Body row
this row must be
duplicated n-times by the
tablemodule
© 2010 WERK II Medien- und Informationsgesellschaft mbH
7
Tablemodule: Row Insert Method
! To duplicate the dynamic part the table module needs a Row Insert Method!
!   Add a Row Insert Method to the body row to duplicate this row as much as it is
needed.!
! 
A Row Insert Method is a SQL - select statement that delivers the primary
keys to the objects in the content system that should be displayed in the
table.!
! 
The number of fetched rows from these statement sets the number of row
duplications in the table !
© 2010 WERK II Medien- und Informationsgesellschaft mbH
8
Tablemodule: Row Insert Method
List of datasets
List of datasets for the
table. The statement
delivers again 4 keys (3
int and 1 string)for each
row.
RootTableRecord
If the table is generated by a
table placeholder the
placeholder delivers his 4
object keys to these tags:
<RootTableRecordID>
<RootTableRecordID2>
<RootTableRecordID3>
<RootTableRecordStringID>
Rows in Indesgin Table
The comet table module
duplicates the body row
for each row the
statement delivers and
stores the 4 keys form
each datarow into the
indesgin table row
(hidden).
© 2010 WERK II Medien- und Informationsgesellschaft mbH
9
Tablemodule: Create a Row Insert Method
! Use the priint:comet workbench to create a new Action with the type „Table-Insert“!
! 
Create a statement that delivers the keys from all objects (e.g. products) that
should be displayed in the table.!
© 2010 WERK II Medien- und Informationsgesellschaft mbH
10
Tablemodule: Set the Row Insert Method
!
! 
Step 2
Set the Row Insert
Method in this pulldown
menu
Create a statement that delivers the keys from all objects (e.g. products) that
Step 3
in the table.!
activate the Row Insert
Step 1
Set the text
cursor inbe
the displayed
should
first column of the
dynamic part
Method with this check
box
Step 4
set the size of the
block to duplicate for
each row from the
Row Insert Method. It
could be one row or
more
© 2010 WERK II Medien- und Informationsgesellschaft mbH
11
Tablemodule: Set the Row Insert Method
!   Every cell that gets a placeholder to load data from the content system into the cell
need an assigenment of for object keys for the placeholder. !
! 
The keys are delivered by the Row Insert Method and/or the Column Insert Method!
!
Step 1
Set the text cursor in the
first column of the
dynamic part
Step 3
Repeat this for all cells in
the dynamic part.
Step 2
transfer the Ids from the
Row Insert Method to the
cell
© 2010 WERK II Medien- und Informationsgesellschaft mbH
12
Tablemodule: First check
!   First connect the cell to a node in the product pool. !
!   This node delivers the 4 RootTableRecord keys for the Insert Methods.
!
!
Step 1
Set the text cursor in one
cell of the table
Step 4
Click this icon to execute
the table template with
the linked object from the
productpool panel
Step 3
Click this icon. The name
of the node appears
Step 2
select the node that
gives the
RootRecordKeys. The
Insert Method statement
can get all products with
this keys
© 2010 WERK II Medien- und Informationsgesellschaft mbH
13
Tablemodule: First check
!   The table module generates all needed rows !
!   The cell gets keys for the placeholders.!
! No data yet !
!
Cell Record Ids
The keys in the selected
cell.
© 2010 WERK II Medien- und Informationsgesellschaft mbH
14
Tablemodule: First check
!   Set placeholders to the dummy text in the cells !
Placeholders
Set placeholder for the
attribute
© 2010 WERK II Medien- und Informationsgesellschaft mbH
15
Tablemodule: First check
! Testing again!
© 2010 WERK II Medien- und Informationsgesellschaft mbH
16
Create template and table placeholder
© 2010 WERK II Medien- und Informationsgesellschaft mbH
17
Tablemodule: Make a template
! Testing again!
Step 1
Set the text cursor in one
cell of the table
Step 2
Click this icon to add the
template
© 2010 WERK II Medien- und Informationsgesellschaft mbH
18
Tablemodule: Make a template
Name
Set the name for the
template
© 2010 WERK II Medien- und Informationsgesellschaft mbH
19
Tablemodule: Use the table template in a placeholder
! 
Create a table placeholder in the priint:comet workbench!
!
Type
Use type „table“
© 2010 WERK II Medien- und Informationsgesellschaft mbH
20
Tablemodule: Use the table template in a placeholder
Load Skript
Add this code to the load
script ot the placeholder.
It links the placeholder to
the table template
© 2010 WERK II Medien- und Informationsgesellschaft mbH
21
Tablemodule: Use the table template in a placeholder
! 
Set the placeholder as a text placeholder…!
!
© 2010 WERK II Medien- und Informationsgesellschaft mbH
22
Tablemodule: Use the table template in a placeholder
! 
… and link it with to a node in the product pool (SHIFT-click)!
!
© 2010 WERK II Medien- und Informationsgesellschaft mbH
23
Design Methods
© 2010 WERK II Medien- und Informationsgesellschaft mbH
24
Tablemodule: Design Methods
! 
Add Design Methods to cells, rows, colums or areas to modify the layout of the
table after build!
!
!
Desgin Method are coded in C-Script. !
Using the call „table“ to modify the table.!
! 
! 
!
Set strokes and fills!
Add or remove rows or columns!
Merge or split cells!
© 2010 WERK II Medien- und Informationsgesellschaft mbH
25
Tablemodule: Design Methods
!
Example: Set a row to red depending of the content of the cell in one column!
© 2010 WERK II Medien- und Informationsgesellschaft mbH
26
Tablemodule: Create A Design Methods
! 
Create a Action Script in the priint:comet workbench with the type „Table-DesignMethod“!
© 2010 WERK II Medien- und Informationsgesellschaft mbH
27
Tablemodule: Create A Design Methods
Cell Ids
Get the 4 IDs from the
cell (productIDs).
Get Genre
Get genres for this row
Fill Row
If genre = ‚Horror‘ then fill
the row with the swatch
color „Red“ (need to be
defined in the Indesign
Document)
© 2010 WERK II Medien- und Informationsgesellschaft mbH
28
Tablemodule: Create A Design Methods
Step 2
Click this icon to add a
new line for a Design
Method
Step 1
Set the text cursor in one
cell of the table
Step 3
Set the Design Method
© 2010 WERK II Medien- und Informationsgesellschaft mbH
29
Tablemodule: Create A Design Methods
! 
… and test it!
© 2010 WERK II Medien- und Informationsgesellschaft mbH
30
Table with variable number of rows and variable number
of columns
© 2010 WERK II Medien- und Informationsgesellschaft mbH
31
Tablemodule: Cross table
! 
This table has a variable number of rows and columns!
Placeholder sets an X
Placeholder sets an X if a product is from
the genre in this column
© 2010 WERK II Medien- und Informationsgesellschaft mbH
32
Tablemodule: Skeleton table
Dynamic columns
N columns for genres
Dynamic rows
N rows for product
© 2010 WERK II Medien- und Informationsgesellschaft mbH
33
Tablemodule: Set Column Insert Method
! 
… and test it!
Set Column Insert Metho
N columns for genres
© 2010 WERK II Medien- und Informationsgesellschaft mbH
34
Tablemodule: Set Row Insert Method
! 
… and test it!
Set Row Insert Method
N rows for products
© 2010 WERK II Medien- und Informationsgesellschaft mbH
35
Tablemodule: Set Ids for the Column Header
Set Coumn IDs
Set Column IDs for the
header cell
© 2010 WERK II Medien- und Informationsgesellschaft mbH
36
Tablemodule: Set Ids for the Row Header
Set Row IDs
Set Row IDs for the product
namesl
© 2010 WERK II Medien- und Informationsgesellschaft mbH
37
Tablemodule: Set Ids for the Row/Column Cell
Set Row/Column IDs
Set a combination of
RowRecordStringID and
ColumnRecordStringID. The
placeholder in this cell need
both IDs
© 2010 WERK II Medien- und Informationsgesellschaft mbH
38
Tablemodule: Set Ids for the Row/Column Cell
Combined StringID
The row and column Ids are
joined together with the |--|
separator.
© 2010 WERK II Medien- und Informationsgesellschaft mbH
39

Similar documents