Umbraco 官方技术文档 翻译 六 Data-Types 数据类型


Data-Types
数据类型
A Data Type defines the type of input for a property. So when adding a property (on Document Types, Media Types and Members) when selecting the Type you are selecting a Data Type. There are a number of of preconfigured Data Types available in Umbraco and more can be added in the Developer section.
一个数据类型定义了一个属性的输入类型 。当添加一个属性(文档类型、媒体类型或成员的属性)时,在选择类型是,你需要选择一个数据类型。有许多可用的预置的数据类型在Umbraco中可用,也可以开发者自己添加新的。

What is a data type?
数据类型是什么?

A Data Type can be something very simple (textstring, number, true/false,...) or more complex (multi node tree picker, image cropper, Grid Layout).

The Data type references a Property Editor and if the Property Editor has settings these are configured on the Data Type. This means you can have multiple Data Types referencing the same Property Editor.

An example of this could be to have two dropdown Data Types both referencing the same dropdown Property Editor. One configured to show a list of cities, the other a list of countries.
数据类型可以是非常简单的(如textstring、数量、真/假…)或者更复杂的(多节点树选择器、图像切割,网格布局。。)。

数据类型与属性编辑器有关。多个数据类型可以引用同一个属性编辑器。

一个例子,可以有两个下拉数据类型都引用同一个下拉属性编辑器。一个显示城市的列表,另一个现实其他国家的列表。

Creating a new Data-Type
创建一个新的数据类型
To create a new Data Type go to the Developer section and click the menu icon to the right of Data-Types and select Create. Name the Data Type, we'll call it "Dropdown Cities".
创建一个新的数据类型,去Developer 部分,单击Data-Types右边的 菜单图标 ,并选择Create 。命名为“Dropdown Cities ”。


  • Property Editor: This is where you pick the Property Editor that our Dropdown Cities Data Type will be referencing. Pick the Dropdown List and now you will see the cofiguration options that are available for a Data Type referencing the Dropdown List Property Editor.

  • Property Editor Alias The alias of the Property Editor being used.

  • Add prevalue: Here you can add prevalues to this Data Type by entering the value you want into the input field and pressing the add button. For the "Dropdown Cities" list this could be:
  • Property Editor :这是你给Dropdown Cities 数据类型选择的属性编辑器。选择Dropdown List ,现在您将看到数据类型的下拉菜单的cofiguration选项。
  • Property Editor Alias :被使用的属性编辑器的别名。
  • Add prevalue :在这里你可以添加数据类型 的预置值,在输入框中 输入你想要的值,点击Add按钮。“Dropdown Cities ”名单可能是:
    • London
    • Paris
    • Berlin
When you're happy with the list press Save and it is now possible to select this Data Type for a property on Document Types, Media Types and Members. This will then create a dropdown list for the editor to choose from and save the choice as a string.
当你改好后,点击Save,现在就可以在文档类型,媒体类型和成员 中选择这个数据类型来作为属性了。这将创建一个下拉列表,可以选择,并保存选择的字符串。

Customizing Data-Types
自定义数据类型

To customize an existing Data Type go to the Developer section, expand the Data-Types node and select the Data Type you want to edit.

Aside from the Data Types that are available out of the box there are some additional Property Editors to choose from such as the Slider and Macro Container.
定制一个现有的数据类型,可以去Developer 部分,扩展Data-Type节点并选择想要编辑的数据类型。

除了可用的数据类型的属性编辑器外,还有一些额外的选择如SliderMacro Container

More information

Related Services

Umbraco.tv

乐播投屏是一款简单好用、功能强大的专业投屏软件,支持手机投屏电视、手机投电脑、电脑投电视等多种投屏方式。 多端兼容与跨网投屏:支持手机、平板、电脑等多种设备之间的自由组合投屏,且无需连接 WiFi,通过跨屏技术打破网络限制,扫一扫即可投屏。 广泛的应用支持:支持 10000+APP 投屏,包括综合视频、网盘与浏览器、美韩剧、斗鱼、虎牙等直播平台,还能将央视、湖南卫视等各大卫视的直播内容一键投屏。 高清流畅投屏体验:腾讯独家智能音画调校技术,支持 4K 高清画质、240Hz 超高帧率,低延迟不卡顿,能为用户提供更高清、流畅的视觉享受。 会议办公功能强大:拥有全球唯一的 “超级投屏空间”,扫码即投,无需安装。支持多人共享投屏、远程协作批注,PPT、Excel、视频等文件都能流畅展示,还具备企业级安全加密,保障会议资料不泄露。 多人互动功能:支持多人投屏,邀请好友加入投屏互动,远程也可加入。同时具备一屏多显、语音互动功能,支持多人连麦,实时语音交流。 文件支持全面:支持 PPT、PDF、Word、Excel 等办公文件,以及视频、图片等多种类型文件的投屏,还支持网盘直投,无需下载和转格式。 特色功能丰富:投屏时可同步录制投屏画面,部分版本还支持通过触控屏或电视端外接鼠标反控电脑,以及在投屏过程中用画笔实时标注等功能。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值