CategoryTree

Posted by Community Admin on 03-Aug-2018 11:18

CategoryTree

All Replies

Posted by Community Admin on 07-Feb-2011 00:00

Hi,

I have recently moved from SF3.7 to SF4.0 and have found that there is no longer a CategoriesTree, which you can combine with a DownloadList, to get a directory style file download thing going on.

Is there anything similar in SF4.0 that I can use instead and how would i go about implementing it?

Thanks in advance!

Regards,

George

Posted by Community Admin on 07-Feb-2011 00:00

Hello George,

You can use Categories widget from "Classifications" widget section.

All the best,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 07-Feb-2011 00:00

Hi Ivan,

Thanks for the quick response, i thought this would probably be it, however when i drag the widget onto a page it says, 'You are trying to access item that no longer exists. The most probable reason is that it has been deleted by another user.'. Is there some field i am filling in wrong in the settings?

Thanks,

George

Posted by Community Admin on 07-Feb-2011 00:00

Hi George,

Have you set any properties of the control or this happens right after you drop it on a page. Can you replicate the issue using our demo.
Make sure that you are using the official release of Sitefinity 4.0 .

You can also try to recreate your categories and tags if you have not used them.

Best wishes,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 25-Mar-2011 00:00

Hi,

I have fixed the issue with the error that was displaying, however it displays all categories as a list. I have seen that the only set options for 'RenderAs' are VerticalList, HorizontalList and Cloud ... is there not an option to have it display as a tree, using the RadTreeView say?

Thanks,

George

Posted by Community Admin on 25-Mar-2011 00:00

Hello George,

We do not have a public control that will render the categories as RadTreeView. It should be a custom control - RadTreeView that is bound to a datasource of categories.

sample

var manager = TaxonomyManager.GetManager();
var taxonomy = manager.GetTaxonomy(TaxonomyManager.CategoriesTaxonomyId);
var taxa = taxonomy.Taxa;
foreach(HierarchicalTaxon t intaxa)
   // here you can use t.Parent and
   // t.Subtaxa

to build the url you have to use TaxonomyEvaluator

             var evaluator = new TaxonomyEvaluator();
             var taxonBuildOptions = TaxonBuildOptions.None;
            if(this.Taxonomy is HierarchicalTaxonomy)
                taxonBuildOptions = TaxonBuildOptions.Hierarchical;
            elseif(this.Taxonomy is FlatTaxonomy)
                taxonBuildOptions = TaxonBuildOptions.Flat;
var evaluatedResult = evaluator.BuildUrl(this.Taxonomy.Name, taxon, "Category", taxonBuildOptions, "UrlPath", null);


Regards,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 25-Mar-2011 00:00

Thanks Ivan for your reply,

I will have a look at this, however two things:

- I am using Telerik.Sitefinity.Taxonomies and Telerik.Sitefinity.Taxonomies.Model but Taxonomy is complaining that there is no definition for it..?

- And what is the datasource i have to use? Apologies I am very new to this taxonomy stuff!

Thanks,

George

Posted by Community Admin on 30-Mar-2011 00:00

Hello,

manager.GetTaxonomy returns ITaxonomy. From this ITaxonomy you get the taxons. For example you have a taxonomy of type HierarchicalTaxon and inside this ITaxonomy you have items - hierarchical taxons. The Taxa returns IEnumerable<ITaxon> which you have to bind to your control. This is the datasource you need to build.

Best wishes,
Ivan Dimitrov
the Telerik team

This thread is closed