Extension, Module

Archived
Forum
(read-only)

Stash

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From Mark Croxton

     

Listing entries per category, grid not parsing

Support Request

Ngon Com
Ngon Com

Hi Mark,

As your mention here: https://github.com/croxton/Stash/wiki/Listing-entries-per-category

It works well, but my entry have grid field, stash can’t capture data inside grid:

{exp:channel:entries channel="blog" dynamic="no" disable="member_data|pagination|category_fields"}
    {categories}
        {exp
:stash:append_list name="blog" context="{category_id}"}
       {stash
:this_title}{title}{/stash:this_title}
       {stash
:this_url_title}{url_title}{/stash:this_url_title}
       {stash
:this_body}{blog_body}{/stash:this_body}
   
   {this_grid limit
="1"}
    {stash
:this_grid_file}{this_grid:file}{/stash:this_grid_file}
   {
/this_grid}

        {
/exp:stash:append_list}
    {
/categories}
{
/exp:channel:entries} 

Output ”{stash:this_grid_file}” not parsing:

{exp:channel:categories channel="blog" style="linear" disable="category_fields" show_empty="no"}
    
<h2>{category_name}</h2>
    <
ul>
    
{exp:stash:get_list name="blog" context="{category_id}"}
 
<li>
     <
a href="/blog/{this_url_title}">
       <
h2>{this_title}</h2>
      <
p>{this_body}</p>
   
      <
p>Not parsing{this_grid_file}</p>
     </
a
 </
li>
 
{/exp:stash:get_list}
    
</ul>
{/exp:channel:categories} 

Thank so much!

Mark Croxton
# 1
Developer
Mark Croxton

Please take a look at how to capture nested lists:
https://github.com/croxton/Stash/wiki/Lists#three-and-more-dimensional-lists

Ngon Com
# 2
Ngon Com

Oh, my mistake is focus to append_list and forget set_list, another way I using match + again to solve problem.

Thank Mark!