Page 1 of 1
cgblog - display only limited number of blogs
Posted: Mon Nov 15, 2010 9:44 am
by rowena
Hi there,
I need to display a snippet of the latest 3 blogs on the Home page of my site - how do i do that?
I tried setting the pagelimit (pagelimit="3"). that showed the latest 3 BUT, also showed the 'next page' links to go to next page, which is not what i want. and removing the 'next page' bit it in the template is not the solution either as i will need it on the actual main Blog page where there is another summary listing of blogs.
So how do i set it to show an exact number of entries?
Also, does CGBLOG hae the option to have a ...More link be displayed at the end of blog summaries?
Re: cgblog - display only limited number of blogs
Posted: Mon Nov 15, 2010 9:59 am
by rowena
Hi again,
Just somethign i forgot to mention - i also tried usign the 'number' parameter, and that didnt work either.
Re: cgblog - display only limited number of blogs
Posted: Mon Nov 15, 2010 12:03 pm
by osxfil
in this case is only one solution now - template customization. Simpla create new summary template without following code:
Code: Select all
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
{/if}
Re: cgblog - display only limited number of blogs
Posted: Mon Nov 15, 2010 12:08 pm
by rowena
Thanks, but like i said in my first post, this is not possible as i show this summary listing on two pages, not just the home page. So on the home page, i will need the listing to only show latest 3, and on the other main blog page, i will need to show ALL summary listings with a maximum of 10 per page (which is where the template snippet will come into play).
if i remove the snippet you recommended from the template, then i wont be able to have the 'show max of 10 per page' on the main page, as both the pages will be using the same template.
thanks anyway.
Re: cgblog - display only limited number of blogs
Posted: Mon Nov 15, 2010 4:35 pm
by osxfil
you can use for each page different template. E.g. prepare basic summary template for blog posts and mark it as default. This template will be used for main blog page. Then make copy of this template, set name for this copy to e.g. "summaryMain" and delete this piece of code as i wrote in my first post.
On home page you can the use this tag:
Code: Select all
{CGBlog summarytemplate="summaryMain" number="3"}
and on main blog page:
Hope this help
Re: cgblog - display only limited number of blogs
Posted: Tue Nov 16, 2010 2:06 pm
by rowena
ok, thanks. i will try this and let you know.
thanks again!