目录模板允许在左侧创建菜单,并且应在右侧视图上显示相关内容。
使用以下代码,我只能看到只有一排图像的一个网格。如果我还添加20张图像,则所有图像都将排在一个标题为一行的一行中。
<document>
<catalogTemplate>
<banner>
<title>Movies</title>
</banner>
<list>
<section>
<listItemLockup>
<title>All Movies</title>
<decorationLabel>6</decorationLabel>
<relatedContent>
<grid>
<section>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_A.png" width="250" height="376" />
<title>Movie 1</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_B.png" width="250" height="376" />
<title>Movie 2</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_C.png" width="250" height="376" />
<title>Movie 3</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375.png" width="250" height="376" />
<title>Movie 4</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_C.png" width="250" height="376" />
<title>Movie 5</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375.png" width="250" height="376" />
<title>Movie 6</title>
</lockup>
</section>
</grid>
</relatedContent>
</listItemLockup>
</section>
</list>
</catalogTemplate>
</document>
但是我需要两个标题不同的部分。因此,我复制了网格内容并再次粘贴。
<document>
<catalogTemplate>
<banner>
<title>Movies</title>
</banner>
<list>
<section>
<listItemLockup>
<title>All Movies</title>
<decorationLabel>6</decorationLabel>
<relatedContent>
<grid>
<section>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_A.png" width="250" height="376" />
<title>Movie 1</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_B.png" width="250" height="376" />
<title>Movie 2</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_C.png" width="250" height="376" />
<title>Movie 3</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375.png" width="250" height="376" />
<title>Movie 4</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_C.png" width="250" height="376" />
<title>Movie 5</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375.png" width="250" height="376" />
<title>Movie 6</title>
</lockup>
</section>
</grid>
<grid>
<section>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_A.png" width="250" height="376" />
<title>Movie 1</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_B.png" width="250" height="376" />
<title>Movie 2</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_C.png" width="250" height="376" />
<title>Movie 3</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375.png" width="250" height="376" />
<title>Movie 4</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375_C.png" width="250" height="376" />
<title>Movie 5</title>
</lockup>
<lockup>
<img src="path to images on your server/Car_Movie_250x375.png" width="250" height="376" />
<title>Movie 6</title>
</lockup>
</section>
</grid>
</relatedContent>
</listItemLockup>
</section>
</list>
</catalogTemplate>
</document>