Skip to content

getModuleBlogArticles(int items_per_page)

The getModuleBlogArticles method is used to get the BlogArticlesList object that represents a list of articles with module flag checked.

Input parameters

items_per_page

int Number of items in a page of internal paginator. Parameter is optional. Default value is 10.

Returned value

The BlogArticlesList object.

Example

source
{% set moduleArticles = ObjectApi.getModuleBlogArticles() %}
{% for blogArticle in moduleArticles %}
        <a href="{{ blogArticle.url }}" title="{{ blogArticle.name}}">
            {{ blogArticle.shortContent }} - {{ blogArticle.author }}
        </a>
{% endfor %}
output
<a href="/en/n/12" title="New Year, New You: Shop Our Fitness Collection">
    Get ready to crush your fitness goals with our collection of workout gear and accessories. 
    From yoga mats to resistance bands, we've got everything you need to stay motivated and active. 
    Start your fitness journey today and shop our collection now! - Andy
</a>
<a href="/en/n/21" title="Limited-Time Offer: Free Shipping on All Orders">
    For a limited time only, we're offering free shipping on all orders! Shop our collection of fashion, beauty, and lifestyle products from the comfort of your home and enjoy free shipping on us. 
    Don't wait, start shopping now! - Miranda
</a>