<?php
$template = <<<END
<!--{def item/title}-->
<!-- pop1_gallery: ギャラリー -->
<section class="pop1_gallery">
<h2 class="dn">{val item/title}</h2>

<div class="thumbnail-slide">
<!--{each item/list}-->
<!--{def item/list/link}-->
<a href="{val item/list/link}"><img src="user_data/{val item/list/image}" alt=""></a>
<!--{/def}-->
<!--{ndef item/list/link}-->
<img src="user_data/{val item/list/image}" alt="">
<!--{/ndef}-->
<!--{/each}-->
</div>

</section>
<!--{/def}-->
END;

$pop1_gallery = array(
		"title" => "POP1ギャラリー",
		"name" => "pop1_gallery",			// 名称、重複すると正しく動作しません
		"template" => $template,		// ブロックのテンプレート
		"input" => array(
		"help" => array(
			"title" => "使い方",
			"type" => "comment",
			"link" => DOCUMENT1 . "/?act=pop1_gallery",
			"class" => "notice",
		),
			"title" => array(
				"title" => "タイトル",
				"type" => "text",
			),
			"image1" => array(
				"title" => "画像1",
				"type" => "image",
			),
			"link1" => array(
				"title" => "リンク1",
				"type" => "text",
			),
			"image2" => array(
				"title" => "画像2",
				"type" => "image",
			),
			"link2" => array(
				"title" => "リンク2",
				"type" => "text",
			),
			"image3" => array(
				"title" => "画像3",
				"type" => "image",
			),
			"link3" => array(
				"title" => "リンク3",
				"type" => "text",
			),
			"image4" => array(
				"title" => "画像4",
				"type" => "image",
			),
			"link4" => array(
				"title" => "リンク4",
				"type" => "text",
			),
			"image5" => array(
				"title" => "画像5",
				"type" => "image",
			),
			"link5" => array(
				"title" => "リンク5",
				"type" => "text",
			),
			"image6" => array(
				"title" => "画像6",
				"type" => "image",
			),
			"link6" => array(
				"title" => "リンク6",
				"type" => "text",
			),
		),
		"repeat" => array(
			"image", "link",
		),
	);

block_add($pop1_gallery);
