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 ezbinaryfile (Datei)

Der Datentyp ezbinaryfile (Datei): was er speichert und wie Templates ihn verwenden.

Download as PDF

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

On this page

This page is a translation. Read the English original

Der Datentyp ezbinaryfile (Datei)

Klasse eZBinaryFileType in kernel/classes/datatypes/ezbinaryfile/ezbinaryfiletype.php; Bezeichner ezbinaryfile, aufgeführt in settings/content.ini [DataTypeSettings] AvailableDataTypes[].

Was er speichert

Die Spalten der Attributtabellen, die seine Klasse liest oder schreibt: data_int1 (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. Er ist von der Suche indiziert; aus einer hochgeladenen Datei befüllbar.

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/ezbinaryfile.tpl:

{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{if $attribute.content}
<a href={concat( 'content/download/', $attribute.contentobject_id, '/', $attribute.id,'/version/', $attribute.version , '/file/', $attribute.content.original_filename|urlencode )|ezurl}>{$attribute.content.original_filename|wash( xhtml )}</a>&nbsp;({$attribute.content.filesize|si( byte )})
{/if}

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

{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{default attribute_base=ContentObjectAttribute}

{* Current file. *}
<div class="block">
<label>{'Current file'|i18n( 'design/standard/content/datatype' )}:</label>
{if $attribute.content}
<table class="list" cellspacing="0">
<tr>
<th>{'Filename'|i18n( 'design/standard/content/datatype' )}</th>
<th>{'MIME type'|i18n( 'design/standard/content/datatype' )}</th>
<th>{'Size'|i18n( 'design/standard/content/datatype' )}</th>
</tr>
<tr>
<td>{$attribute.content.original_filename|wash( xhtml )}</td>
<td>{$attribute.content.mime_type|wash( xhtml )}</td>
<td>{$attribute.content.filesize|si( byte )}</td>
</tr>
</table>
{else}
<p>{'There is no file.'|i18n( 'design/standard/content/datatype' )}</p>
{/if}

{if $attribute.content}
<input class="button" type="submit" name="CustomActionButton[{$attribute.id}_delete_binary]" value="{'Remove'|i18n( 'design/standard/content/datatype' )}" title="{'Remove the file from this draft.'|i18n( 'design/standard/content/datatype' )}" />

Überschreiben Sie sie für ein Klassenattribut in einer override.ini.append.php mit Source=content/datatype/view/ezbinaryfile.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/ezbinaryfile/ezbinaryfiletype.php, settings/content.ini, design/standard/templates/content/datatype/view/ezbinaryfile.tpl, design/standard/templates/content/datatype/edit/ezbinaryfile.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