<asp:ListView ID="ListView1" runat="server">
<LayoutTemplate>
<asp:PlaceHolder runat="server" ID="itemplaceholder"></asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<sc:Image runat="server" ID="ImageRenderer1" Field="ThumbImage"
Item="<%# Container.DataItem as Sitecore.Data.Items.Item %>" />
<sc:FieldRenderer ID="FieldRenderer2" runat="server" FieldName="Headline"
Item="<%# Container.DataItem as Sitecore.Data.Items.Item %>" /><br />
</ItemTemplate>
</asp:ListView>
后面的代码:
string path = "/abc/abc/abc/abc/abc/abc/abc/abc/abc/abc";
var item = sc.Context.Database.GetItem(path);
MultilistField m = item.Fields["test"];
Item[] collection = m.GetItems();
ListView1.DataSource = dataset;
ListView1.DataBind();
在 MultilistField, m 中,它会得到至少 10 个项目。现在,我需要为用户单击链接的标题字段创建链接,它将用户重定向到该特定项目。任何的想法 ?