18.10.2017
twitter: @yenzenz jk@kleinundpartner.at
http://kleinundpartner.at
Under Mosaic and its JavaScript-based editor, there is a whole powerful layout ecosystem making Diazo, portlets and viewlets almost obsolete.
This talk is about the building blocks of Mosaic: layouts, tiles, slots, and panels.
Length: Long Talk
Target Level: Intermediate
Target Audience: Integrator, Developer
Blocks: Utilizing The Screed Under Mosaic to build sites, by Jens W. Klein
1. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.1 von 16
2. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.2 von 16
15th Plone Conference
Barcelona, Catalonia, Spain
2017
Blocks:
Utilizing The Screed
Under Mosaic to build sites
Jens W. Klein twitter: @yenzenz
jk@kleinundpartner.at
18.10.2017 http://kleinundpartner.at
3. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.3 von 16
I'am ...
● Jens KLEIN
● located in Innsbruck, Tyrol, Austria
● doing Plone since version 1.0,
● a consultant, developer, open source lover,
● owner of Klein & Partner KG, co-founder and
member of BlueDynamics Alliance,
● member of Plone Foundation,
● member of framework- and security-team
Ad:
Alpine City Sprint at Innsbruck
January 22th to 26th 2017
MARS is a thing, Zope 4 too!
4. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.4 von 16
TOC
● short Mosaic introduction
● create and re-use content layouts
● introduction to tiles - how to implement tiles
● introduction into site-layouts
● layout-behavior explained into detail
● rendering process of a mosaic site
● subrequests briefly explained
● packages behind mosaic
● some examples made with Mosaic
5. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.5 von 16
All Code Available at
https://github.com/bluedynamics/
kup.bsp.mosaic
(in on line)
6. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.6 von 16
LIVE DEMO
Brief Live Intro Into Mosaic
Store Created Content Layout for
reusability
7. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.7 von 16
Tiles
Two types of Tiles:
● view-like tiles just showing something
● tiles with schema and own storage
8. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.8 von 16
LIVE DEMO
Simple Tile displaying a random number
Tickerline tile with two fields
9. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.9 von 16
Site Layouts
● replacement for main-template.
● Similar to content layouts, different lookup
mechanism,
● different site-layouts per sections possible,
● very flexible.
10. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.10 von 16
LIVE DEMO
Show how to enable and register
a site-layout
11. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.11 von 16
Layout behavior
● fields with content specific selected or
customized content layout
● fields with content specific selected site or
sections site layouts.
→ LIVE DEMO
12. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.12 von 16
Rendering Process
of a Mosaic Site
● Tiles are rendered at end of request in
transformchain
● First, reponse body is parsed by lxml
● Second, panel merging takes place,
● Third, tiles are rendered via subrequests,
● Fourth, ESI post-processing happens,
● Finally, the site is passed over to Diazo and gets
published.
13. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.13 von 16
Subrequests
● some magic happens
● Clone of main request with all data copied
● executes request within current process
● new traversal and call with all steps for
publication, creating and returning a response
object.
14. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.14 von 16
Packages behind Mosaic
● plone.app.mosaic
● plone.app.blocks
● plone.tiles
● plone.app.tiles
● plone.app.standardtiles
● plone.app.drafts
15. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.15 von 16
LIVE DEMO
● Sites using Mosaic
16. Text: Creative Commons Namensnennung-Keine
kommerzielle Nutzung- Keine Bearbeitung 3.0
Österreich Lizenz.16 von 16
Questions?