Note: For v2.1 only don't know if it exists on other versions
1. Open
DasBlog All Solution File from source Directory
2. Open
SharedBasePage.cs from
newtelligence.DasBlog.Web.Core project
3. Search for
private EntryCollection GetEntriesForPage(int pageIndex, int entriesPerPage, string langCode) method
4. Change From:
private EntryCollection GetEntriesForPage(int pageIndex, int entriesPerPage, string langCode)
{
EntryIdCache cacheToCopy = DataService.GetEntryIdCache();
//Shallow copy as we're going to modify it...and we don't want to modify THE cache.
EntryIdCacheEntryCollection cache = (EntryIdCacheEntryCollection)cacheToCopy.Entries.Clone();
if (pageIndex * entriesPerPage < cache.Count)
{
// Remove all entries before the page's first entry.
for (int i = 0; i < pageIndex * entriesPerPage; i++)
{
cache.RemoveAt(0);
}
// Remove all entries after the page's last entry.
if (cache.Count - entriesPerPage > 0)
{
cache.RemoveRange(entriesPerPage, cache.Count - entriesPerPage);
}
return DataService.GetEntries(null, EntryCollectionFilter.DefaultFilters.IsInEntryIdCacheEntryCollection(cache),
Int32.MaxValue,
Int32.MaxValue);
}
// The page index is out of range (i.e. too large).
return new EntryCollection();
}To:
private EntryCollection GetEntriesForPage(int pageIndex, int entriesPerPage, string langCode)
{
EntryCollection toClone = DataService.GetEntries(null, null, int.MaxValue, int.MaxValue);
EntryCollection allEntries = (EntryCollection)toClone.Clone();
if (pageIndex * entriesPerPage < allEntries.Count)
{
// Remove all entries before the page's first entry.
for (int i = 0; i < pageIndex * entriesPerPage; i++)
{
allEntries.RemoveAt(0);
}
// Remove all entries after the page's last entry.
if (allEntries.Count - entriesPerPage > 0)
{
allEntries.RemoveRange(entriesPerPage, allEntries.Count - entriesPerPage);
}
return allEntries;
}
// The page index is out of range (i.e. too large).
return new EntryCollection();
}5. Update
newtelligence.DasBlog.Web.Core.dll in your bin folder
now frontpage paging should work on v2.1