Codestar Framework创建幻灯设置

Codestar Framework默认是没有幻灯组件的,可以通过Field Repeater来构建幻灯。

Codestar Framework创建幻灯截图
Codestar Framework创建幻灯截图

预设幻灯要素:名称、图片、链接、描述,配置代码:

array(
  'id' => 'opt-repeater-t',
  'type' => 'repeater',
  'title' => '幻灯',
  'fields' => array(
    array(
      'id' => 'opt-rt-1',
      'type' => 'text',
      'title' => '名称',
    ),

    array(
      'id' => 'opt-rt-2',
      'type' => 'upload',
      'title' => '图片',
      'library' => 'image'
    ),

    array(
      'id' => 'opt-rt-4',
      'type' => 'text',
      'title' => '链接',
      'placeholder' => 'http:// or https://',
    ),

    array(
      'id' => 'opt-rt-3',
      'type' => 'textarea',
      'title' => '描述',
    ),
  ),
),

也可以使用 Field Group 来实现。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注