• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

media download latest 5 items

Explorer ,
Mar 17, 2015 Mar 17, 2015

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"}

TOPICS
Developer

Views

504

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 17, 2015 Mar 17, 2015

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 17, 2015 Mar 17, 2015

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 17, 2015 Mar 17, 2015

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 17, 2015 Mar 17, 2015

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 17, 2015 Mar 17, 2015

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 05, 2016 Oct 05, 2016

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines