Modular News Feed - Methods

Hi , Sorry really struggling as I try and learn grav.
I have been looking at trying to use a way to get to loop through a child under a module to get post items, then use a simple scroller / slide idea to display the articles of news

I tried doing this with starting with a modular item called _features taken from the woo template.

The page layout from under admin

Where i have then created a sub dir called then added the pages below it
so _testimonials
_modular_blog/item sub directory non prefixed

Is this the correct way or I dont need to use the entry and just have the items listed as sub directories underneath

I have then looked at the code in blogs and item twig and seem to get really lost in it

because the testimonials (user/theme/woo/templates/modular/testimonals.twig.html)

could some one point us how to loop through the articles and get the heading title and the content as I just cant seem to return anything!

So please the best practises for accomplishing something like this would be appreciated
Thank you

Can you please edit the post and use backticks around your code? As missing _ before the folder name can change the result.


Since posting I found that it doesn't need to be in a sub-directory of I can just leave the folders in the route of _testimonials 

I have just included a image of the current layout of pages

but struggle to work out to loop through the directories and access the page content etc Grav

I kinda of understand that I need to get the items as collection of pages and then step through them outputting the fields of title and content in to a bullet list

but struggling how to do it and find anything to give me direction even after looking at the blog code of antimatter

thanks for replying though

The testimonials twig, in that theme, iterates and outputs an array of testimonial quotes taken from its own page header. See

So by default it won’t show anything related to its child pages.

An example of how such thing works can be found in the Antimatter theme:

You can download the “Blog site” skeleton which has a working example of a blog page:

Finally got a kinda of solution, it may not be pretty, but I am not the best programmer / designer, but someone might find it useful.

Top Level

title: Testimonals
    items: '@self.modular'
        by: default
        dir: asc
            - _testimonials
menu: Home


title: testimonials

    changefreq: monthly 
    priority: 1.03

    items: @self.children
        by: date
        dir: desc
    limit: 4

then create modular subpages under _testimonals


title: 'Testimonals 1'
    items: '@self.modular'
        by: default
        dir: asc
            - _testimonials

Another fantastic little bit of code

google this click here


title: 'Sunshine in the Hills'
    items: '@self.modular'
        by: default
        dir: asc
            - _testimonials


testing a link this here

the code for the template is as follows

{% block content %}
{% set collection = page.collection() %}

{{ content }}
                <ul class="slides">
                    {% for post in collection %}
                            <h4>{{ post.title }}</h4>
                                <p> {{ post.content }}</p>
                    {% endfor %}

    <span><i class="quote-right fa fa-quote-right"></i></span>
{% endblock %}


This was using / devolped created with a the woo theme which has the font-awesome included so css used

#testimonials .quote-left {
    left: 5%;

#testimonials .quote-left, #testimonials .quote-right {
    position: absolute;
    top: 50%;
    color: #fff;
    font-size: 40px;
    margin-top: -25px;

.fa {
    display: inline-block;
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

file can be downloaded by!Asx43U2CMes5gXFvdaL0au9t4Lsg
this doesnt included the woo theme, so that will need to be downloaded first and this will just update the files to work