Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,075 of 9,075 pages
About the help in other languages
All help pages

Line view

The line view, the template of a content item in a list: what it receives, a teaser example with image, title, date and intro, parameters from the caller, headings inside lists, and per-class line views.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/templates/line-view.md

On this page

Line view

This page is for designers who style items in lists: children of a folder, search results, latest news. The line view mode draws one item; node_view_gui calls it for each node.

Contents

  1. What it receives
  2. A teaser example
  3. Headings and links
  4. Per class

What it receives

$node, $view_parameters (offset 0), and any parameter the caller passes ({node_view_gui content_node=$child view='line' image_class='small'}). The kernel's default design/standard/templates/node/view/line.tpl prints an icon and the linked name.

A teaser example

{* override/templates/line/article.tpl *}
{default image_class='small' heading='h3'}
<article class="teaser">
    {if $node.data_map.image.has_content}
        <div class="teaser-media">{attribute_view_gui attribute=$node.data_map.image image_class=$image_class}</div>
    {/if}
    <{$heading} class="teaser-title"><a href={$node.url_alias|ezurl}>{$node.name|wash}</a></{$heading}>
    <p class="teaser-meta"><time datetime="{$node.object.published|datetime( 'custom', '%Y-%m-%d' )}">{$node.object.published|l10n( 'shortdate' )}</time></p>
    {if $node.data_map.intro.has_content}
        <div class="teaser-intro">{$node.data_map.intro.content.output.output_text|strip_tags|shorten( 160 )|wash}</div>
    {/if}
</article>
  • The heading level depends on where the list sits: an h2 list title means h3 items. Let the caller pass it (heading above).
  • One link per item, on the title; a card whose whole surface is clickable can stretch the title link with CSS instead of wrapping everything in <a>.

Per class

An override with Source=node/view/line.tpl and Match[class_identifier]=article gives articles their line template (Node templates by class). Keep the markup of all line templates similar, so lists mixing classes look consistent.

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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x