How to show only author posts in blogpost widget - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

How to show only author posts in blogpost widget

  • How to show only author posts in blogpost widget
  • Hi,

    I need to show only currently logged user posts in blogpost widget, how can i filter them?

    I got:

    public bool UserIdComp(Telerik.Sitefinity.Blogs.Model.BlogPost post)
                var identity = ClaimsManager.GetCurrentIdentity();
                Guid currentUserGuid = identity.UserId;
                Guid postOwnerId = new Guid(Telerik.Sitefinity.Model.DataExtensions.GetValue(post, "Owner").ToString());
                Telerik.Sitefinity.Security.UserManager userManager = Telerik.Sitefinity.Security.UserManager.GetManager();
                return true;
                return false;

    It works, but i cant use "if" in RadListView ItemTemplate to check if that post belong to currently logged user cause i want to show only such posts.

    I wanna do sth like this:

    <telerik:RadListView ID="Repeater">


    some data




    show post



    Thanks in advance

  • Setting permissions on blog posts should do the trick. I believe you can set view permissions to owner. 
  • But i need to show owner posts only on this page, on other i wanna show all blogposts. If i set permissions on blogposts to owner it will be applied on all pages i think.