Skip to content

getBlogArticle(int article_id)

The getBlogArticle method is used to get a BlogArticle object that represents blog article available in the storefront.

Input parameters

article_id

int Numeric identifier of the blog article.

Returned value

The BlogArticle object.

Example

source
{% set blogArticle = ObjectApi.getBlogArticle(article_id) %}

<a href="{{ blogArticle.url }}" title="{{ blogArticle.name}}">
    <p>{{ blogArticle.shortContent }} - {{ blogArticle.author }}</p>
    <br>
    Posted on: {{ blogArticle.createdAt }}
</a>
output
<a href="/en/n/1" title="New T-shirts soon">
    Soon we will introduce a new series of eco-shirts - Katerine

    Posted on: 10-06-2022 
</a>