Hi,
I have the Blog app running and I am using perch_content_custom to not only return a list of blog entries, but also, I am using it to return entries designated as 'most popular' and 'most recent' in a sidebar.
The issue is, as soon as implement pagination on the post.php page, the main perch_content_custom call, which returns the listing of blog entries and is first on the page updates fine, but all content in the subsequent calls is lost.
Is there a way to retain the content with pagination.
The main template (index.php) looks like:
- <!-- Blog Items
- ============================================= -->
- <?php
- perch_blog_custom(array(
- 'filter' => 'postDateTime',
- 'sort' => 'postDateTime',
- 'sort-order' => 'DESC',
- 'count' => 1,
- 'template' => 'blog_post_in_list.html',
- ));
- ?>
- <!-- Sidebar
- ============================================= -->
- <div class="sidebar nobottommargin col_last clearfix">
- <div class="sidebar-widgets-wrap">
- <div class="widget clearfix">
- <div class="tabs nobottommargin clearfix" id="sidebar-tabs">
- <ul class="tab-nav clearfix">
- <li><a href="#tabs-1">Popular</a></li>
- <li><a href="#tabs-2">Recent</a></li>
- <!--<li><a href="#tabs-3"><i class="icon-comments-alt norightmargin"></i></a></li>-->
- </ul>
- <div class="tab-container">
- <div class="tab-content clearfix" id="tabs-1">
- <?php
- perch_blog_custom(array(
- 'filter' => 'postCommentCount',
- 'sort' => 'postCommentCount',
- 'sort-order' => 'ASC',
- 'count' => 3,
- 'template' => 'post_in_list_popular_comments.html',
- ));
- ?>
- </div>
- <div class="tab-content clearfix" id="tabs-2">
- <?php
- perch_blog_custom(array(
- 'filter' => 'postDateTime',
- 'sort' => 'postDateTime',
- 'sort-order' => 'DESC',
- 'count' => 3,
- 'template' => 'post_in_list_recent.html',
- ));
- ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
Now I realise that the pagination is set within the template 'blog_post_in_list.html' which would then only effect that main element:
but then how do I either move pagination to within index.php as <perch:template> cannot be directly applied, or do I somehow have to try and include the sidebar content within my 'blog_post_in_list.html' which I cannot see how to do, to get the pagination working.
That is, the bog posts are paginated, but the content in the sidebar (post_in_list_popular_comments.html and post_in_list_recent.html) are not.
Any ideas welcome.
Thanks,
Andy