Codestar Framework默认是没有幻灯组件的,可以通过Field Repeater来构建幻灯。
预设幻灯要素:名称、图片、链接、描述,配置代码:
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 来实现。