Nunaliit Tutorial: Switching from classic to tiled display format

By default atlas documents are shown in the side panel using the classic display format. However, the Nunaliit framework can also display documents in a tile format which can be easily adjusted in an atlas with a single line of code.

The tile display can be applied to a single module, or applied to all modules throughout the atlas. To display documents in a tile display format for a specific module, you can edit the display.json file, located in the nunaliit_module directory. Within the display.json file you will need to add the key “type” and the value “tiled”.

Where to find the display.json file:

module name (e.g. module.demo)/
└── nunaliit_module
 –└── display.json

Example display.json:

{
"defaultSchemaName":"demo_doc",
"type":"tiled"
}

Alternatively, if you prefer the tile display over the classic format you can apply this preference to all modules in the atlas. This option can be applied by adding the displayFormat custom service option within the custom service portion of the window.nunaliit_custom.configuration function (located in the nunaliit_custom.js file).

Location of the nunaliit_custom.js file in your atlas:

atlas/
└── htdocs
 –└── nunaliit_custom.js

Example nunaliit_custom.js code addition:

customService.setOption('displayFormat','tiled');
Tiled Display

Screenshot of a Nunaliit atlas using the tiled display (showing four related documents as tiles)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s