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

Forums / Bugs & Issues / Retrive Posts of Blog

Retrive Posts of Blog

7 posts, 0 answered
  1. Anu
    Anu avatar
    72 posts
    Registered:
    17 Jun 2010
    27 Jun 2011
    Link to this post
    Hello
    How to retrive Posts of perticular Bolgs which contains Name of Post , AutherName(custom Field), Thumbnail Image (custom Field) , PublicationDate

    I have used in following way ... But im getting error as

    Exception of type 'Telerik.OpenAccess.SPI.Util.QueryExceptionHelper' was thrown.




    IQueryable

     

     

    <BlogPost> allPosts =
    App.WorkWith()

     

    .BlogPosts()

    .Where(bP => bP.Parent.Title == "BlogName" && bP.Status ==

     

    ContentLifecycleStatus.Live)

     

    .Get();


    What is the problem ... Please Help !

    Thanks :)
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    27 Jun 2011
    Link to this post
    Hello Anu,

    I executed the code you pasted without problems. Do you use the latest version of Sitefinity? The error shows that the query to the database is not valid which might be a result of passing wrong data in the query.
    Can you replicate this issue on a new installation?

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Anu
    Anu avatar
    72 posts
    Registered:
    17 Jun 2010
    28 Jun 2011
    Link to this post
    Hello Admin,

    im using Sitefinity 4.0.1210.0 version ... i have fired following Query

    BlogsManager

    manager = BlogsManager.GetManager();  

    IQueryable<BlogPost> allPosts = manager.GetBlogPosts()
    .Where(p => p.Parent.Title ==
    "SEM").Where(s => s.Status == ContentLifecycleStatus.Live);
     

    Where SEM is the name of my Blog and i want to retrive all the post of Blog "SEM" ... is it right ?

    im getting following attached Error ...

    Please Help ...
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    28 Jun 2011
    Link to this post
    Hi Anu,

    Please upgrade to the latest official release which is 4.1 1501 and let me know whether you experience problems. You can also install a new project with the project manager which will take no more than 1 minute and execute the same code to see if there will be any progress.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Anu
    Anu avatar
    72 posts
    Registered:
    17 Jun 2010
    30 Jun 2011
    Link to this post
    Hello Admin,

    BlogsManager

    manager = BlogsManager.GetManager();  

     

    BlogPost allPosts = manager.GetBlogPost(guid);

    from the above query how to retrive Value of Custom Fields  from allPosts  ?
    I have added "Meta_Description" Custom Field in Blog Post n i want to retrive its value.

    Please tel me.

    Thanks and Regards
    Anu.

     

  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    30 Jun 2011
    Link to this post
    Hi Anu,

    Here is a sample

    allPosts. GetValue("name of your field);

    GetValue is a method of DataExtensions class, so please add reference to it.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Anu
    Anu avatar
    72 posts
    Registered:
    17 Jun 2010
    30 Jun 2011
    Link to this post
    Hello Admin,

    Thanks a lot ... tht solved my issue ... :)

7 posts, 0 answered