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

Datentyp ezrangeoption (Wertebereich Option)

Der Datentyp ezrangeoption (Wertebereich Option): was er speichert und wie Templates ihn verwenden.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/datatypes/ezrangeoption.md

On this page

This page is a translation. Read the English original

Der Datentyp ezrangeoption (Wertebereich Option)

Klasse eZRangeOptionType in kernel/classes/datatypes/ezrangeoption/ezrangeoptiontype.php; Bezeichner ezrangeoption, aufgeführt in settings/content.ini [DataTypeSettings] AvailableDataTypes[].

Was er speichert

Die Spalten der Attributtabellen, die seine Klasse liest oder schreibt: data_text, data_text1 (data_text, data_int, data_float und sort_key_* gehören zum Objektattribut; data_text1 ... data_int4 sind die Einstellungen des Klassenattributs). Durch Lesen der Klasse ermittelt: eine Heuristik.

In Templates

my_attribute steht für den Bezeichner eines Attributs dieses Typs in Ihrer Klasse:

{def $attribute = $node.data_map.my_attribute}
{if $attribute.has_content}
    {attribute_view_gui attribute=$attribute}
{/if}
{* der Wert, wie der Datentyp ihn zurückgibt (objectAttributeContent()) *}
{$attribute.content|attribute( show, 1 )}

Das ausgelieferte Template, das ihn anzeigt (attribute_view_gui), design/standard/templates/content/datatype/view/ezrangeoption.tpl:

{* DO NOT EDIT THIS FILE! Use an override template instead. *}
<label>{$attribute.content.name|wash}:</label>
<select name="eZOption[{$attribute.id}]">
{section var=Options loop=$attribute.content.option_list}
<option value="{$Options.item.id}">{$Options.item.value|wash}</option>
{/section}
</select>

Das ausgelieferte Template, das ihn bearbeitet (attribute_edit_gui), design/standard/templates/content/datatype/edit/ezrangeoption.tpl (die ersten 25 Zeilen):

{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{default attribute_base=ContentObjectAttribute}
<div class="block">

<label for="ezcoa-{if ne( $attribute_base, 'ContentObjectAttribute' )}{$attribute_base}-{/if}{$attribute.contentclassattribute_id}_{$attribute.contentclass_attribute_identifier}_name">{'Name'|i18n( 'design/standard/content/datatype' )}:</label>
<input id="ezcoa-{if ne( $attribute_base, 'ContentObjectAttribute' )}{$attribute_base}-{/if}{$attribute.contentclassattribute_id}_{$attribute.contentclass_attribute_identifier}_name" class="box ezcc-{$attribute.object.content_class.identifier} ezcca-{$attribute.object.content_class.identifier}_{$attribute.contentclass_attribute_identifier}" type="text" name="{$attribute_base}_data_rangeoption_name_{$attribute.id}" value="{$attribute.content.name|wash}" />
</div>

<div class="block">

<div class="element">
<label for="ezcoa-{if ne( $attribute_base, 'ContentObjectAttribute' )}{$attribute_base}-{/if}{$attribute.contentclassattribute_id}_{$attribute.contentclass_attribute_identifier}_start_value">{'Start value'|i18n( 'design/standard/content/datatype' )}:</label>
<input id="ezcoa-{if ne( $attribute_base, 'ContentObjectAttribute' )}{$attribute_base}-{/if}{$attribute.contentclassattribute_id}_{$attribute.contentclass_attribute_identifier}_start_value" class="ezcc-{$attribute.object.content_class.identifier} ezcca-{$attribute.object.content_class.identifier}_{$attribute.contentclass_attribute_identifier}" type="text" name="{$attribute_base}_data_rangeoption_start_value_{$attribute.id}" size="3" value="{$attribute.content.start_value|wash}" />
</div>

<div class="element">
<label for="ezcoa-{if ne( $attribute_base, 'ContentObjectAttribute' )}{$attribute_base}-{/if}{$attribute.contentclassattribute_id}_{$attribute.contentclass_attribute_identifier}_stop_value">{'Stop value'|i18n( 'design/standard/content/datatype' )}:</label>
<input id="ezcoa-{if ne( $attribute_base, 'ContentObjectAttribute' )}{$attribute_base}-{/if}{$attribute.contentclassattribute_id}_{$attribute.contentclass_attribute_identifier}_stop_value" class="ezcc-{$attribute.object.content_class.identifier} ezcca-{$attribute.object.content_class.identifier}_{$attribute.contentclass_attribute_identifier}" type="text" name="{$attribute_base}_data_rangeoption_stop_value_{$attribute.id}" size="3" value="{$attribute.content.stop_value|wash}" />
</div>

<div class="element">
<label for="ezcoa-{if ne( $attribute_base, 'ContentObjectAttribute' )}{$attribute_base}-{/if}{$attribute.contentclassattribute_id}_{$attribute.contentclass_attribute_identifier}_step_value">{'Step value'|i18n( 'design/standard/content/datatype' )}:</label>
<input id="ezcoa-{if ne( $attribute_base, 'ContentObjectAttribute' )}{$attribute_base}-{/if}{$attribute.contentclassattribute_id}_{$attribute.contentclass_attribute_identifier}_step_value" class="ezcc-{$attribute.object.content_class.identifier} ezcca-{$attribute.object.content_class.identifier}_{$attribute.contentclass_attribute_identifier}" type="text" name="{$attribute_base}_data_rangeoption_step_value_{$attribute.id}" size="3" value="{$attribute.content.step_value|wash}" />
</div>

Überschreiben Sie sie für ein Klassenattribut in einer override.ini.append.php mit Source=content/datatype/view/ezrangeoption.tpl und einer Bedingung auf attribute_identifier (siehe Ein Template-Override).

Siehe auch


Erzeugt von ./console exp:help:examples --language=ger-de aus kernel/classes/datatypes/ezrangeoption/ezrangeoptiontype.php, settings/content.ini, design/standard/templates/content/datatype/view/ezrangeoption.tpl, design/standard/templates/content/datatype/edit/ezrangeoption.tpl. Bearbeiten Sie diese Seite nicht: Ändern Sie die Quelle oder die deutsche Übersetzung und erzeugen Sie sie neu (wie). Freie Dokumentation: GFDL 1.3 oder später.

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