<?php
$template = <<<END
<!--{def item/title}-->
<!-- block_text: 文章 -->
<section class="block_text">
<h2>{val item/title}</h2>
<!--{each item/list}-->
<!--{def item/list/subtitle}-->
<h3>{val item/list/subtitle}</h3>
<!--{/def}-->
<!--{def item/list/text}-->
<div class="markdown-body">{rval item/list/text}</div>
<!--{/def}-->
<!--{/each}-->
</section>
<!--{/def}-->
END;

$block_text = array(
	"title" => "文章",
	"name" => "block_text",			// 名称、重複すると正しく動作しません
	"template" => $template,		// ブロックのテンプレート
	"input" => array(
		"help" => array(
			"title" => "使い方",
			"type" => "comment",
			"link" => DOCUMENT1 . "/?act=block_text",
			"class" => "notice",
		),
		"title" => array(
			"title" => "タイトル",
			"type" => "text",
		),
		"subtitle1" => array(
			"title" => "サブタイトル1",
			"type" => "text",
		),
		"text1" => array(
			"title" => "文章1",
			"type" => "textarea",
		),
		"subtitle2" => array(
			"title" => "サブタイトル2",
			"type" => "text",
		),
		"text2" => array(
			"title" => "文章2",
			"type" => "textarea",
		),
		"subtitle3" => array(
			"title" => "サブタイトル3",
			"type" => "text",
		),
		"text3" => array(
			"title" => "文章3",
			"type" => "textarea",
		),
		"subtitle4" => array(
			"title" => "サブタイトル4",
			"type" => "text",
		),
		"text4" => array(
			"title" => "文章4",
			"type" => "textarea",
		),
		"subtitle5" => array(
			"title" => "サブタイトル5",
			"type" => "text",
		),
		"text5" => array(
			"title" => "文章5",
			"type" => "textarea",
		),
	),
	"repeat" => array(
		"subtitle", "text",
	),
);

block_add($block_text);
