Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 461 Vote(s) - 3.47 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display data from taxonomy using Ektron CMS with ASP.Net

#1
I am trying display the content from taxonomy by using Ektron CMS with ASP .Net

By using the taxonomy path i got the id and trying to display the content.
But i am getting content as null.

Please let me know the possible solutions to solve this.
Waiting for experts answers.

Thanks,
Reply

#2
My guess is that the "Get Content By Taxonomy" function you are using by default does not fetch the content. You can either-

a) Use the ID to get the content via the content manager API
b) Investigate if the function you are using has an override to include content.
Reply

#3
In my development environment, I have the following taxonomy:

const string eventsTaxonomyPath = "\\Upcoming Events";
const long eventsTaxonomyId = 89;

It sounds like you already found this method (or something like it) in what I like to call the "Legacy API":

var taxonomyApi = new Ektron.Cms.API.Content.Taxonomy();
var taxonomyId = taxonomyApi.GetTaxonomyIdByPath(eventsTaxonomyPath);

Without any info on what version you're on, I'll assume it's a recent (8.5+) version. The Framework API makes it really easy to get the content from a given taxonomy. Below are a couple of ways that work on v9.0 and will most likely work in anything 8.5+ -- in the [developer briefing webcast]() the only major change for the Framework API in v9 was the inclusion of the e-commerce namespace.

Getting the full taxonomy tree via the `TaxonomyManager`:

var taxonomyItemManager = new Ektron.Cms.Framework.Organization.TaxonomyManager();
var taxData = taxonomyItemManager.GetTree(eventsTaxonomyId, includeItems: true);

Getting all the content recursively from a given taxonomy folder via the `ContentManager`:

var contentManager = new Ektron.Cms.Framework.Content.ContentManager();
var criteria = new ContentTaxonomyCriteria();
criteria.AddFilter(eventsTaxonomyPath, true);
criteria.ReturnMetadata = true;
var content = contentManager.GetList(criteria);

The potential downside to the `ContentManager` way is that you lose the hierarchical taxonomy structure. The upside to using the `ContentManager` is that you can tell it to include all the metadata for each content block. That's not possible with the `TaxonomyManager` or `TaxonomyItemManager`.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through