Forum

Thread tagged as: Problem, Blog

Blog App. Limit number of blogs in a template.

Hi, I may be trying something that is not possible but I have a template in which I want to display the latest 4 blog entries is this possible?

<section>
            <div class="container">
                <div style="margin-left: 20px;margin-left:50px;">

                    <h3><perch:content id="blog-strapline" type="text" label="Blog Strapline" /></h3>
                    <div class="well1">  
                        <div class="row">                   
                        <perch:template path="blog/ashfield-blog.html" />
    <!--                    <?php
                            //perch_blog_custom(array(
                            //  'sort'=>'postDateTime',
                            // 'sort-order'=>'DESC',
                            //  'template'=>'blog/ashfield-blog.html',
                            //  'count'=>4
                            //)); 
                        ?>      
    -->
                        </div> 
                    </div>               
                </div>
            </div>
        </section>

I have all the template but I cannot see how to limit the number of blogs. I know that the php script will not work,but this how I did it in a previous page.

Cheers

Dennis Pickworth

Dennis Pickworth 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You would need to do this in your page, with perch_blog_custom rather than in the template.