Thursday, April 25 2024 @ 06:07 PM JST

Geeklog DataBox Msater data

  • Friday, September 06 2013 @ 03:07 AM JST
  • 投稿者:
  • 表示回数 8,469
Geeklog

DataBoxのアトリビュート(Attributes)のタイプ(type)には、マスター(Master)を別途登録(regist)してそれを参照して作成するリスト(List)があります。

マスター(Master)で、種別を Country にして、各国のなまえ(Country name)、コード(code)などを一式登録(regist)します。その次のアトリビュート作成画面(Attributes admin)で、マスター(master) 「Country」を参照したリスト(List)を、テーマ変数(Theme variable)「country」で作成します。作成するデータのタイプのアトリビュート(Attributes)に登録。データ(create data)を作成します。

1. Create master for list attribute

[lightbox:/images/library/Image/geeklog/databox/geeklog_databox_master_create.png width:auto height:250]

2.Type

[lightbox:/images/library/Image/geeklog/databox/geeklog_databox_type.png width:auto height:250]

3. Add attribute

[lightbox:/images/library/Image/geeklog/databox/geeklog_databox_type_attribute.png width:auto height:250]

4. Attribute list by "Master"

[lightbox:/images/library/Image/geeklog/databox/geeklog_databox_attribute_mst.png width:auto height:250]

5. Attribute list

[lightbox:/images/library/Image/geeklog/databox/geeklog_databox_attribute_list.png width:auto height:250]

6. Create attribute

[lightbox:/images/library/Image/geeklog/databox/geeklog_databox_attribute_create.png width:auto height:250]

7. Create new data

[lightbox:/images/library/Image/geeklog/databox/geeklog_databox_data_create_new.png width:auto height:250]

8. Create theme "master"

copy default directry to master, and edit list_detail.thtml.

plugins/databox/templates/data/master/list_detail.thtml:

<dl>
<dt>country_no</dt>
<dd>{country_no}</dd>
<dt>country</dt>
<dd>{country}</dd>
<dt>country_2</dt>
<dd>{country_2}</dd>
<dt>country_disp</dt>
<dd>{country_disp}</dd>
</dl>

9. data edit

[lightbox:/images/library/Image/geeklog/databox/geeklog_databox_data_edit.png width:auto height:250]

Select theme: master

10. Display data

https://www.ivysoho.net/databox/data.php/mastertest/code

[lightbox:/images/library/Image/geeklog/databox/geeklog_databox_data_master.png width:auto height:250]

Display by using theme "sample"(plugins/databox/templates/data/sample).

https://www.ivysoho.net/databox/data.php/mastertest/code/sample

詳しいドキュメントはこちら。 See DataBox documents for further details.