Fork me on GitHub

Limit number of RSS listings in Content Module?  Bottom

  • I am testing out the Content module, and I would like to limit the number of RSS listings to 5 per feed. I don't see where it's possible unless you change the template, and I'm not sure how to do that (add a limit?):

    Code

    <h3><a href="<!--[$feed.permalink]-->"><!--[$feed.title]--></a></h3>
    <!--[if count($feed.items) > 0]-->
    <!--[if $includeContent]-->
      <!--[foreach from=$feed.items item=item]-->
      <h4><a href="<!--[$item.permalink]-->"><!--[$item.title]--></a></h4>
      <!--[if $item.description]--><p><!--[$item.description]--></p><!--[/if]-->
      <!--[/foreach]-->
    <!--[else]-->
     <ul>
      <!--[foreach from=$feed.items item=item]-->
       <li><a href="<!--[$item.permalink]-->"><!--[$item.title]--></a></li>
      <!--[/foreach]-->
     </ul>
    <!--[/if]-->
    <!--[/if]-->
  • Don't know if this helps. I can't seem to find out how to do it through Smarty and I can't find where to do it in admin either but here you go:
    http://www.smarty.ne…age.function.if.php
  • Hey, I already did the changes some time ago (the updates were not applied yet) and added the patched files to ticket 41 in code.zikula http://code.zikula.org/content/ticket/41 . I couldn't attach the files to ticket 40 icon_smile
    Now it only obtains the specified nr of items from simplepie.

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • Thanks! Before I got your reply, I ended up just hard coding in the code itself (not good, I know). But thanks again for your work and I look forward to future Content updates! The module is great for what I need it to do. icon_biggrin

This list is based on users active over the last 60 minutes.