ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Limit the number of entries using a global variable ?

July 17, 2007 9:07am

Subscribe [2]
  • #1 / Jul 17, 2007 9:07am

    Jim Dad

    34 posts

    The parameter

    limit=“5”

    limits the number of entries on a page, using the following

    {exp:weblog:entries weblog="{special_weblog}" limit="5"}

    in the template.


    Changing 5 to 3 means to modify the associated template which is easy for a developper, but may be not easy/secure for a user/customer.


    A pretty solution should be to use a User Defined Global Variable, something as

    {nb_entries}

    .

    I tried using

    {exp:weblog:entries weblog="{special_weblog}” limit=”{nb_entries}”}

    but did not succeed.


    Something wrong ? Is there a way ?

  • #2 / Jul 17, 2007 12:32pm

    Lisa Wess

    20502 posts

    Have a look at these docs - what you’re trying won’t work, and it’s clearly stated there.  You could do this using path.php global variables but that is arguably even less friendly to an end-user, requiring FTP, etc.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases