Skip to the content
Documentation

content_view_gui

No ratings yet

Summary

Outputs a view template for a content object.

Usage

{content_view_gui content_object=object [ view=view ] [ parameter=value [...] ]}

Parameters

Name Type Description Required
content_object object The target content object. Yes.
view string The view mode that should be used. No.
other parameters any Parameter(s) that will be passed to the included template. No.

Description

This function shows the view interface for a content object. The target object must be specified (as an "ezcontentobject" object) using the "content_object" parameter. The "view" parameter is optional, it can be used to specify a desired view (for example "text", "text_linked", "embed", etc.). The function will attempt to use the following template from either the current design or one of the fallback designs: "templates/content/view/[name_of_view_mode].tpl". All other parameters (of any type) will be passed on and thus become available as template variables in the included template.

Contributors

Comments (3 historical)

Written by readers of the earlier documentation sites, kept as they were.

  1. Intention of the various 'Standard' views?

    James Robertson ·

    Some documentation regarding the intended use of the various 'views' available in the 'Standard' templates would be helpful. Especially when deciding how/whether to override a template for a particular purpose. [I have not been able to find comprehensive documentation in this regard.]

  2. $object

    Adrien ·

    The name of the variable received from content_object argument is $object (the most important is not in the doc)

Comments

Add a comment

Comments are read by a moderator before they appear.