1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Execution of 'Telerik.Sitefinity.Taxonomies.Model.OrganizerBase:TaxonExists(String,Guid)' on the database server side currently not implemented. exception

Execution of 'Telerik.Sitefinity.Taxonomies.Model.OrganizerBase:TaxonExists(String,Guid)' on the database server side currently not implemented. exception

2 posts, 0 answered
  1. Monika
    Monika avatar
    2 posts
    Registered:
    31 Jan 2012
    06 Mar 2012
    Link to this post
    here is the picec of the  code.
    i m  trying to fatch the imgaes inside the herarchial texanomy. please  provide the solution or any other way out to get the image in side the  herarchial texanomy.waiting


    string maincatname = drpbussiness.SelectedItem.Text;
                       string subcat = drpcountry.SelectedItem.Text;  


                             var images = App.WorkWith().Images()
                                .Where(
                              (w) => w.Organizer.TaxonExists("Category", Guid.Parse(drpcountry.SelectedValue)) && w.Title.Contains(searchText)).Get();
                          Int32 s=   images.Count();   
                        foreach (Telerik.Sitefinity.Libraries.Model.Image v in images)
                           {
                               var url = App.WorkWith().Image(v.Id).Get().MediaUrl;
                               //  this.ImageControl.ImageUrl = url + "&size=300";
                               imagepath = url + "&size=300";
                               ImagesTable.Rows.Add(i, imagepath, v.Parent.Title, "", " 0");
                               i++;
                           }
  2. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    09 Mar 2012
    Link to this post
    Hi Monika,

    You can get images with specific taxonomy set to them by getting the taxonomy first and then checking which image have this taxonomy as a value of their field (category for example).  Note that we're using the GetValue() method to retrieve the value of a field.Take a look at the sample below:
    string maincatname = "TaxName";//drpbussiness.SelectedItem.Text;
              // string subcat = drpcountry.SelectedItem.Text; 
               var searchText = "myetxt";
               var manager = TaxonomyManager.GetManager();
               var myCat = manager.GetTaxa<HierarchicalTaxon>().Where(t => t.Name.Contains("maincatname")).SingleOrDefault();
               var images = App.WorkWith().Images()
                               .Where(im => im.GetValue<TrackedList<Guid>>("Category").Contains(myCat.Id) && im.Title.Contains(searchText)).Get();
               foreach (var img in images)
               {
                   
               }


    Greetings,
    Jen Peleva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered