Low Reorder with GWCode Parameters(for categories) and Stash
Hi I'm trying to pull in a list of entry's from all my product category parents (limited to 3 each).
The category names are stored in a stash value. I'm not sure how to go from there into pulling the results into low reorder.
any help would be appreciated. thanks
Replies
FlyDuo 20 May 2014 21:47
This is an example of how we were doing this before low reorder:
{exp:channel:entries
channel="products"
dynamic="no"
orderby="date"
sort="desc"
disable="member_data|pagination|category_fields"
status="open|featured"
cache="yes"
refresh="5"
}
{categories}
{exp:stash:append_list name="products_{category_id}"}
{stash:item_title}{title}{/stash:item_title}
{stash:item_body}{product_description}{/stash:item_body}
{stash:item_link}{title_permalink=products/view/}{/stash:item_link}
{stash:item_image}{product_image}{image:url}{/product_image}{/stash:item_image}
{/exp:stash:append_list}
{/categories}
{/exp:channel:entries}
{exp:channel:categories
parent_only="yes"
channel="products"
style="linear"
disable="category_fields"
}
{category_name}
<!-- .products_flex_box -->
{exp:stash:get_list
name="products_{category_id}"
limit="3"
}
a href="{item_link}" title="{item_title}">
img src="{item_image}" class="img-thumbnail" alt="{title}">
{item_title}
/a>
<!-- /.product_single_flex_item -->
{/exp:stash:get_list}
<!-- /.products_flex_box -->
{/exp:channel:categories}
Low 21 May 2014 07:03
I'm not familiar with Stash or GWcode's add-on, so I can't really comment on that.
The low_reorder:entries tag works just like the channel:entries tag, so you could just swap the tags, make sure LR's set="" parameter is defined, and it should output the entries as expected.
So, if you create a LR Set, you can display a subset of that list by setting the entry_id parameter, for example.
FlyDuo 21 May 2014 18:04
Hi Low,
Thanks for your reply. Your tip was just what I needed in order to get it to work the way we wanted.
Thanks and have a great day!