我需要從鏈接信息表中獲取組件id,其中url字段與某個值匹配。是否有任何標準使用內容交付API從tridion的link_info表中獲取數據。 例如從LinkInfo獲取數據的內容交付標準表
問候, 拉金德拉
我需要從鏈接信息表中獲取組件id,其中url字段與某個值匹配。是否有任何標準使用內容交付API從tridion的link_info表中獲取數據。 例如從LinkInfo獲取數據的內容交付標準表
問候, 拉金德拉
組件沒有網址,所以這可能是一個有點棘手來實現。
頁面確實有網址,你可以使用PageFactory
類來找到它們,沿着這些路線的東西:
PageMetaFactory factory = new PageMetaFactory(publicationId);
PageMeta meta = factory.getMetaByUrl(publicationId, "/my/url");
List<ComponentPresentationMeta> cpMetas = meta.getComponentPresentationMetas();
這將包含所有組件的演示文稿列表指定網頁。您可以使用cpMeta.getComponentId()
獲取有問題的組件標識。
您可能要開始問問題外表套上這裏:http://tridion.stackexchange.com
謝謝,但問題是,我在sql中有一個查詢,我需要轉換成broker api方法。查詢是從dbo.link_info鏈接中選擇不同的component_id,其中link.publication_id = 80和link.url不像'%/ Alumni%'。所以現在我想知道是否有任何標準可以使用內容交付API根據此條件返回組件ID。 – rdhaundiyal 2013-03-14 12:51:46
然後我會檢查文檔 - 我不確定是否有任何與URL相關的條件。 – 2013-03-14 13:00:57
通過標準我的意思是Tridion.ContentDelivery.DynamicContent.Query Criteria類,通過它我可以在代理數據庫執行查詢 – rdhaundiyal 2013-03-14 10:28:35