Telerik.Cms.Engine.Data.TagsQuery - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Telerik.Cms.Engine.Data.TagsQuery

  • Telerik.Cms.Engine.Data.TagsQuery
  • 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

     

     

     

     

  • 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.
  • 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;

     

     

     

     

     

  • 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.