我在功能區「SelectCp」上創建了一個按鈕。如何在aspx頁面中填充出版物和組件
OnClick按鈕我啓動了一個自定義aspx頁面。
自定義aspx頁面正在下拉項目。
- 選擇CP
- 等
現在,當用戶選擇選項「選擇CP」,我需要填充所有的出版物中的aspx頁面上的ListItem。當用戶選擇發佈時,我需要將所有組件填充到另一個列表中。
任何人都可以提出一個想法如何進行?
ADDED
我繼續這樣,但它不給在aspx頁面上的列表框公佈的名單。
protected void ddSelectOption_SelectedIndexChanged(object sender, EventArgs e)
{
//CommonTridionTools objCmnUnPub = new CommonTridionTools();
CoreServiceSession client = new CoreServiceSession();
SessionAwareCoreServiceClient csClient = client.GetClient();
ReadOptions readoption = new ReadOptions();
List<string> PublicationList = new List<string>();
List<string> ComponentList = new List<string>();
if (ddSelectOption.SelectedItem.Equals("Select CP"))
{
FolderData RootFolder =(FolderData)csClient.Read(tridionPageId, readoption);
var filter = new OrganizationalItemItemsFilterData
{
Recursive = true,
ItemTypes = new ItemType[] { ItemType.Publication,ItemType.Component, ItemType.ComponentTemplate },
};
XElement CompList = csClient.GetListXml(RootFolder.Id,filter);
foreach (var comp in CompList.Elements())
{
PublicationData Publication =(PublicationData)csClient.Read(comp.Attribute("ID").Value, readoption);
var MetadataXML = new XmlDocument();
MetadataXML.LoadXml(Publication.Metadata);
PublicationList.Add(Publication.Id)
lbPublication.DataSource = PublicationList;
}
}
在與Tridion進行交互和編寫GUI擴展的人們的地方,實際上有數十個例子。你嘗試過那些嗎?你卡在哪裏? http://mattgemmell.com/2008/12/08/what-have-you-tried/ – 2012-07-28 11:50:07