csharp 摆弄Tridion CD分类法......

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp 摆弄Tridion CD分类法......相关的知识,希望对你有一定的参考价值。

    if (!String.IsNullOrEmpty(Request.Params["Keyword"]))
       {
           TaxonomyFactory taxonomyFactory = new TaxonomyFactory();
           Keyword selectedKeyword = taxonomyFactory.GetTaxonomyKeyword(Request.Params["Keyword"]);
           Keyword[] selectedKeywords = { selectedKeyword };
           
           ComponentPresentationFactory presentationfactory = new ComponentPresentationFactory(7);
           ComponentPresentation[] componentPresentations = presentationfactory.GetTaxonomyComponentPresentations(selectedKeywords, "tcm:69-6306-32", true);
           foreach (ComponentPresentation cp in componentPresentations)
           {
               taxonomyOutput.Text += cp.Content;
           }
       }
TaxonomyFactory tf = new TaxonomyFactory();
CompositeFilter filter = new CompositeFilter();
filter.DepthFiltering(2, DepthFilter.FilterDown);
Keyword root = tf.GetTaxonomyKeywords("tcm:69-269-512", filter, "tcm:69-2421-1024");
taxonomyOutput.Text += "root keyword: " + root.KeywordName + "<br/>";
foreach (Keyword child in root.KeywordChildren)
{
     taxonomyOutput.Text += "<li>" + child.KeywordName + "</li>";
}
mytax.TaxonomyFilter = 
	new DepthFilter(DepthFilter.UnlimitedDepth, DepthFilter.FilterDown);

以上是关于csharp 摆弄Tridion CD分类法......的主要内容,如果未能解决你的问题,请参考以下文章

csharp 获得Tridion核心服务客户端

csharp 创建一个SDL Tridion用户trhough CoreService。假设将Tridion核心服务客户端DLL配置为app.config

csharp 创建一个SDL Tridion用户trhough CoreService。假设将Tridion核心服务客户端DLL配置为app.config

csharp 检查TCM URI是否为ECL项。 (SDL Tridion 2013中的ECL API)

csharp 检查TCM URI是否为ECL项。 (SDL Tridion 2013中的ECL API)

csharp 示例SDL Tridion .Net模板,用于将JSON文件创建为包项,然后将其作为二进制变体发布