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

Forums / General Discussions / Return a (page) sitefinity item's Supported Type

Return a (page) sitefinity item's Supported Type

3 posts, 3 answered
  1. code777
    code777 avatar
    0 posts
    Registered:
    24 Feb 2013
    26 Aug
    Link to this post

    Could someone please help me with this puzzling question.

    Since Telerik has many built-in supported types I have also added some of my own:

    Telerik.Sitefinity.Blogs.Model.BlogPost, Telerik.Sitefinity.DynamicTypes.Model.FAQs, Telerik.Sitefinity.DynamicTypes.Model.Legal.Policy, Telerik.Sitefinity.Taxonomies.Model.FlatTaxonomy and Sitefinity.Pages.Model.PageNode.

    In my customRouteHandler i have a method that takes in 2 parameters System.Web.UI.Page and Telerik.Sitefinity.Web.PageSiteNode

    Since I have both objects in hand (Page and PageSiteNode)

    How do i get the type (like above) of the page in hand c# ? 

    Thanks in advance

    Answered
  2. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    26 Aug in reply to code777
    Link to this post

    Page don't have any specific type. Because one page can contain many widgets (news, blog and etc)

    If you want to check if this widget exists on this page, you can get a list of controls for this page. Example you can find here: http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/query-a-page-for-its-controls

    Answered
  3. code777
    code777 avatar
    0 posts
    Registered:
    24 Feb 2013
    26 Aug in reply to Victor Leontyev
    Link to this post
    Thank you Victor, I couldn't see that was a bad idea.
    Answered
3 posts, 3 answered