Skip to the content
Documentation

Enum

No ratings yet

Summary

DEPRECATED

Properties

Name Internal name Searchable Information collector
Enum ezenum Yes. No.

Description

This datatype should not be used any more because it is slow. It has been substituted by the "Selection" datatype.

Contributors

Comments (3 historical)

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

  1. Deprecated Enum

    Blue lue Boy ·

    Although I understand Selection is faster than Enum, it doesn't exactly match usage of the latest. Using Selection forces us to store choices as an array from 0 to n rather than a hash widh any type of keys and values.
    Should we expect the deprecated enum to be removed shortly or can we still keep using it until the Selection can handle pairs of key => value ?

    1. Re: Deprecated Enum

      Marco Zinn ·

      I very much agree with that question.
      In cases where you need a key, enum is the better (and only?) way for this at the moment.

  2. docs

    pike ·

    the .content of an ezenum attribute returns a enum object, which has at least an .enumobject_list property that is a list of strings. from the datatype / view template:

    {section var=Elements loop=$attribute.content.enumobject_list sequence=array( bglight, bgdark )}
    {$Elements.item.enumelement|wash( xhtml )}<br />
    {/section}

    if anyone knows a link to legacy documentation of this object, let us know !
    *-pike

Comments

Add a comment

Comments are read by a moderator before they appear.