More in this section
Forums / Developing with Sitefinity / Blog lookup by URL

Blog lookup by URL

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. bnye
    bnye avatar
    332 posts
    22 Sep 2005
    20 Jun 2007
    Link to this post
    Sorry for the barrage of posts, but I was trying to implement a usercontrol that would set the page title based on the current blog post title. And the same for the news items. Can you point me to the correct class for performing this task based on the current URL.


  2. Bob
    Bob avatar
    330 posts
    30 Dec 2016
    20 Jun 2007
    Link to this post
    Hi Ben,

    Good idea; this should be property of SingleNews/Post controls. Here is an example how you could do this:
    ' Current HttpContext  
    Dim obj As Object = Context.Items("ArticleID")  
    If obj <> Nothing Then 
        'Important: The correct provider name should be specified  
        Dim manager As New ContentManager("News")  
        Dim article As IContent = manager.GetContent(DirectCast(obj, Guid))  
        Page.Title = DirectCast(article.GetMetaData("Title"), String)  
    End If 

    // Current HttpContext  
    object obj = Context.Items["ArticleID"];  
    if (obj != null)  
        //Important: The correct provider name should be specified  
        ContentManager manager = new ContentManager("News");  
        IContent article = manager.GetContent((Guid)obj);  
        Page.Title = (string)article.GetMetaData("Title");  

    All the best,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered