More in this section

Forums / Developing with Sitefinity / Fetch some Pages is not working

Fetch some Pages is not working

7 posts, 1 answered
  1. karnan sekar
    karnan sekar avatar
    80 posts
    Registered:
    07 Jul 2009
    21 Apr 2010
    Link to this post
    Hi,

    I tried to fetch Recent pages updated as mentioned in link

    http://www.sitefinitywatch.com/notes/09-08-18/Sitefinity_API_Tips_amp_Tricks.aspx

    Fetch All Pages is working but Fetch some Pages in not working


    Fetch some pages totalRows returns 0 pages found. Below is the code which i used to get some pages

    CmsManager manager = new CmsManager();<br>        int totalRows;<br>        IList pages = manager.GetPages(0, 5, "DateModified", System.ComponentModel.ListSortDirection.Ascending, out totalRows);<br><br>        Response.Write(totalRows + " pages found.<br /><br />");<br><br>        foreach (CmsPageInfo page in pages)<br>        {<br>            Response.Write(page.CmsPage.MenuName + "<br />");<br>        }  
     
    Please give me your valuable suggestions.

    Thanks,
    Karnan
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    21 Apr 2010
    Link to this post
    Hello karnan sekar,

    Could you try this:
    CmsManager cmsManager = new CmsManager();
    int totalRows;
    IList pages = cmsManager.GetPages(0, 0, "DateModified", System.ComponentModel.ListSortDirection.Descending,out totalRows);

    this will give you a list of all pages sorted in descending order based on on the date they have been modified.

    Best wishes,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. karnan sekar
    karnan sekar avatar
    80 posts
    Registered:
    07 Jul 2009
    21 Apr 2010
    Link to this post
    Hi Radoslav Georgiev

    I tried this code only it give pages count=0 , but total pages are nine.
    Please find the attached files which shows which is working and not working.

    Thanks,
    karnan


  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    21 Apr 2010
    Link to this post
    Hi karnan sekar,

    Try using the code below. It works properly at my end

    var cmsManager = new CmsManager();
    int totalrows = 100;
    var list = cmsManager.GetPages(0, 0, "DateCreated", System.ComponentModel.ListSortDirection.Descending, out totalrows);


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
    Answered
  5. karnan sekar
    karnan sekar avatar
    80 posts
    Registered:
    07 Jul 2009
    21 Apr 2010
    Link to this post
    Hi Ivan Dimitrov

    Please check the 2 screens shot  in the discussion. Fetching all the pages is working and  fetching some pages is not working. Could you please tell me other way to filter 4 recently updated pages.

    Thanks,
    karnan
  6. karnan sekar
    karnan sekar avatar
    80 posts
    Registered:
    07 Jul 2009
    21 Apr 2010
    Link to this post
    Hi Radoslav Georgiev and Ivan Dimitrov

    Please tell me how to build Dashboard custom module


    Thanks,
    Karnan
  7. karnan sekar
    karnan sekar avatar
    80 posts
    Registered:
    07 Jul 2009
    21 Apr 2010
    Link to this post
    Hi Ivan Dimitrov ,

    I found the problem, i am trying to get the pages Last Modified outside the Sitefinity folder.

    Could you please tell me how to get the recent pages modified outside the sitefinity folder. Since we have to show the recently updated pages (i mean Site updates) to the users.


    Thanks,
    karnan

Register for webinar
7 posts, 1 answered