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

node_view_gui

Drawing a node in a view mode with node_view_gui: lists of line views, cards and teasers, the node/view templates, passing extra parameters, the override keys it sets (class, parent, depth, section, remote ids) and why…

Download as PDF

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

On this page

node_view_gui

This page is for designers who draw lists of content: the children of a folder, search results, related articles. Use {node_view_gui} to draw each node in a view mode; the override system then picks the right template per class.

Contents

  1. Use
  2. What the template receives
  3. Override keys
  4. Extra parameters
  5. Why not include?

Use

<ul class="article-list">
{foreach $children as $child}
    <li>{node_view_gui content_node=$child view='line'}</li>
{/foreach}
</ul>

The template used is node/view/line.tpl, or an override for that view and the node's class.

What the template receives

$node (the node), and $view_parameters with offset 0 by default (from the function's definition in kernel/common/eztemplateautoload.php). Note: not $module_result, and not the variables of the calling template other than those passed as parameters.

Override keys

node, object, class, class_identifier, class_group, section, section_identifier, state, state_identifier, parent_node, depth, url_alias, remote_id, node_remote_id, parent_class_identifier, parent_node_remote_id, parent_object_remote_id. So a rule can give articles inside a "News" folder a different line view than articles elsewhere (Override by parent).

Extra parameters

Every other parameter becomes a variable in the view template:

{node_view_gui content_node=$child view='line' image_class='small' show_date=true()}

and in the line template: {default image_class='medium' show_date=false()}.

Why not include?

node_view_guiinclude
per class templates through overridesyesno
other designs can restyle one classyesonly by replacing the whole part
view mode reused elsewhere (layouts blocks, search)yesno

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