View modes
This page is for designers who plan the templates of a design. The same article appears as a whole page, as an item in a list, as a teaser in a block, as an embed in another text. Each of these is a view mode, and each has its own template.

Contents
- The common view modes
- How a view mode is chosen
- Templates behind a view mode
- Caching
- Planning the view modes of a design
The common view modes
| Mode | Used for | Template |
|---|---|---|
full | the page of the content itself | node/view/full.tpl (Full view) |
line | an item in a list | node/view/line.tpl (Line view) |
embed | content embedded as a block in rich text | content/view/embed.tpl, node/view/embed.tpl (Embed view) |
embed-inline | content embedded inside a line of text | embed-inline.tpl (Embed inline view) |
text_linked, text, tiny, plain | short forms in lists, relations and the administration | node/view/ and content/view/ |
listitem, thumb, sitemap, print, pdf | other shipped modes in design/standard/templates/node/view/ |
Designs add their own (the media design has card-like modes and payload; see Custom view modes).
How a view mode is chosen
- The URL:
/content/view/<mode>/<node id>; a URL alias opens thefullmode. - Templates:
{node_view_gui content_node=$child view='line'}and{content_view_gui ... view='embed'}. - Rich text embeds: the editor's choice of view (
embed,embed-inline), limited bycontent.ini [embed] AvailableViewModes[]for the online editor. - Layout blocks: block templates choose a view mode for their items.
Templates behind a view mode
node/view/<mode>.tpl is the default for all classes; overrides give classes their own template for a mode, matched on
Source=node/view/<mode>.tpl (Node templates by class). A mode without a
node/view/<mode>.tpl anywhere in the cascade fails: ship a default template for every custom mode.
Caching
site.ini [ContentSettings] CachedViewModes=full;sitemap;pdf: these modes, opened as pages, are stored in the view
cache. Modes drawn inside other templates (line, embed) are part of the page that draws them and cached with it.
Planning the view modes of a design
- List the places content appears: page, list, card grid, search result, related items, embed, layout blocks.
- Map each to a view mode; reuse
lineandembedbefore inventing new ones. - For each content class that needs a special look in a mode, plan an override.
- Write the default template of every mode first, then the class overrides.
Related pages
- Full view
- Line view
- Custom view modes
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.