like this

<block class="Magefan\Blog\Block\Post\PostList\Item" name="blog.posts.list.item" template="post/list/item.phtml">
      <block class="Magefan\Blog\Block\Post\Info" name="blog.post.info" template="post/info.phtml" />
         <action method="setPostInfoBlockName">
                    <argument name="name" xsi:type="string">blog.post.info</argument>

2 Answers 2


Create a layout file in this path:


And like any other layout define all your blocks and nested blocks (as you have posted in your question).

Note: your template files should be in view/base

And then in CMS page or block use it like:

{{layout handle="magefan_blog_cms_postlist"}}

There is no way to define nested blocks in CMS directly. You need to use your custom layout and layout handle.

  • Thanks ! It works for me. Another problem is whether it is feasible to put the layout file into the custom theme folder
    – tuyuan ho
    Aug 20, 2018 at 13:33
  • Yes you can, actually base is used for both frontend and backend. You can put into theme as well like: Magefan_Blog/layout and similar for template as well.
    – Kumar M
    Aug 20, 2018 at 13:37

You can try

{{block class="Magefan\Blog\Block\Post\PostList\Item" template="Magefan_Blog::post/list/item.phtml"}} 

Hope it helps !

  • I try and it doesn't work
    – tuyuan ho
    Aug 20, 2018 at 9:14
  • You can put it on cms page then save and clear cache to see result Aug 21, 2018 at 2:27
  • Any new result ? Aug 21, 2018 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.