Copy link to clipboard
Copied
I want to show only the last 5 items in a category. I use the parameters below and get 16 items. Please help.
{module_literature filter="latestClassified" itemId="57625"}
Copy link to clipboard
Copied
Like a lot of tags, you'll have to hide the extras with CSS, remove them with javascript, or loop over them yourself with Liquid.
Copy link to clipboard
Copied
Ugh. Why doesn't it just work like its supposed to? latestClassified should only show 10 items but its showing all my items in that category. And, how hard is it to offer a parameter that allows you to choose how many items to show? I don't want to have to hack the system. But thanks for responding Robert, I do appreciate it even though I'm unhappy.
Copy link to clipboard
Copied
Hi,
I've come across this issue before and all the answers I got were a bit of a cop out too.
However with legacy method you'd call your web app like so:
{module_webapps,123,l,5}
With the new BC.Next method you call it this way. (using resultsPerPage)
{module_webapps id="123" filter="latestClassified" itemId="yourCategory" resultsPerPage="5"}
I know it's not beautiful nor programmatically correct, however 'she does the job!'.
Hope you can get this working for your Media Downloads too.
Cheers,
Steve
Copy link to clipboard
Copied
Darn. That sounded promising but doesn't do a thing for the media downloads. I used that for webapps and was successful. I then hid the pagination in the css.
Copy link to clipboard
Copied
It just does not have that parameter Mary, with Liquid and a collection you can do what ever you want with it.
Copy link to clipboard
Copied
Hi mHiggins14,
You can use liquid to achieve this.
{module_literature filter="latestClassified" itemid="118562" collection="test" template=""}
{% for item in test.items| limit:5 %}
<div>
<p>{{forloop.index}}.<img src="{{item.iconUrl}}">- <a href="{{item.fileUrl}}">{{item.name}}</a> </p>
</div>
{%endfor%}
Replace item ID 118562 with the actual category ID.