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

Forums / Sitefinity SDK / Telerik.Cms.Engine.Data.TagsQuery

Telerik.Cms.Engine.Data.TagsQuery

4 posts, 0 answered
  1. Sham
    Sham avatar
    27 posts
    Registered:
    08 Dec 2010
    24 Jan 2011
    Link to this post

    Hi,

    I am having a webservice that gets data from Sitefinity and imports into my application. I am having following code on 3.7

    Dim i As Integer
    Dim oGenericContent As New Telerik.Cms.Engine.ContentManager()
    Dim oCol As New System.Collections.Generic.List(Of Telerik.Cms.Engine.Data.TagsQuery)
    Dim oTagQuery As Telerik.Cms.Engine.Data.TagsQuery
    oTagQuery = oGenericContent.GetTags()
    Dim aString(oTagQuery.Count)() As String
    For i = 0 To oTagQuery.Count - 1
    aString(i) = New String() {oTagQuery.Item(i).ID.ToString(), oTagQuery.Item(i).TagName, oTagQuery.Item(i).TagName, ""}
    Next
    Return aString


    With 4.0 we no more support Telerik.Cms.Engine.Data.TagsQuery and GenericContent.GetTags(). please let me know alternate methods in 4.0

    Rgards

    Sham

     

     

     

     

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 Jan 2011
    Link to this post
    Hi Sham,

    In 4.0 you have to work with Taxonimies. Here is a sample that will return all tags

    var tManager = TaxonomyManager.GetManager();
    var tagTaxonomy = tManager.GetTaxonomy(TaxonomyManager.TagsTaxonomyId);
    var sss =tagTaxonomy.Taxa;


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Sham
    Sham avatar
    27 posts
    Registered:
    08 Dec 2010
    04 Feb 2011
    Link to this post
    Hi Ivan,

    Thank you so much for the help. this is working fine now. however i have following code in global.ascx file which i need to upgrade to 4.0. please suggest the mapping APIs

    Thank you in advance.

    Telerik.Cms.Web.

     

    ICmsUrlContext urlContext = Telerik.Cms.Web.CmsUrlContext.Current;
    if (urlContext != null)
    {
    return urlContext.Path;
    }

     

     

     

     

     

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    04 Feb 2011
    Link to this post
    Hi Sham,

    You can use HttpContext.Current.Request. In 3.x urlContext.Path returns the path of the current request.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
4 posts, 0 answered