cgblog - display only limited number of blogs

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
rowena
Forum Members
Forum Members
Posts: 80
Joined: Mon May 31, 2010 9:56 am

cgblog - display only limited number of blogs

Post 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?
rowena
Forum Members
Forum Members
Posts: 80
Joined: Mon May 31, 2010 9:56 am

Re: cgblog - display only limited number of blogs

Post by rowena »

Hi again,

Just somethign i forgot to mention - i also tried usign the 'number' parameter, and that didnt work either.
osxfil
Forum Members
Forum Members
Posts: 186
Joined: Wed Apr 01, 2009 6:03 pm

Re: cgblog - display only limited number of blogs

Post 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}
rowena
Forum Members
Forum Members
Posts: 80
Joined: Mon May 31, 2010 9:56 am

Re: cgblog - display only limited number of blogs

Post 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.
osxfil
Forum Members
Forum Members
Posts: 186
Joined: Wed Apr 01, 2009 6:03 pm

Re: cgblog - display only limited number of blogs

Post 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:

Code: Select all

{CGBlog}
Hope this help
rowena
Forum Members
Forum Members
Posts: 80
Joined: Mon May 31, 2010 9:56 am

Re: cgblog - display only limited number of blogs

Post by rowena »

ok, thanks. i will try this and let you know.

thanks again!
Post Reply

Return to “Modules/Add-Ons”