Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    ella-listingex 0.2

    Download button

    No screenshots available
    Downloads: 76  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Fragaria s.r.o | More programs
    BSD License / FREE
    June 22nd, 2012, 05:33 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    ella-listingex description

    Change default behavior of category listing pages in Ella

    ella-listingex allows Ella users to change default behavior of category listing pages. By default, each page has same number of objects (if there is enough of them).

    Sometimes, this does not meet the site's requirements. Very often, it is demanded, that first page should be somehow different, e.g. list one more article that is rendered in different style (like leading article). This is unfortunately not possible to do without hackish workarounds in default Ella.

    How to use this

    Setup is quite straightforward. First, install the package using pip or setuptools:

    pip install ella-listingex

    Add the app to your INSTALLED_APPS:

    INSTALLED_APPS = (
     ...,
     'ella_listingex',
     ...
    )


    Configure the ella_listingex to meet your requirements. Internally, this app works by using Ella's CUSTOM_VIEWS override. This means that we are telling Ella to use our views instead of in-built ones. ella_listingex application redefines Ella's ListContentType view to provide additional functionality. Therefore, we need to allow CUSTOM_VIEWS and set the VIEWS variable to the path of ella_listingex.views as shown below:

    # Use custom views to support different number of items on the first and
    # next pages of category listings.
    CUSTOM_VIEWS = True
    VIEWS = 'ella_listingex.views'


    Next step is to set the pagination:

    LISTINGEX_PAGINATE_BY = 10 # Default number of objects per page
    LISTINGEX_FIRST_PAGE_COUNT = 11 # Number of objects on first page


    The ella_listingex works on all category listings which are not blacklisted. If you need to turn the special behaviour off on some pages, use the LISTINGEX_BLACKLIST configuration option to provide list of regular expressions which will be matched against category's tree_path attribute. If there is a match, the first page will be paginated normally:

    LISTINGEX_BLACKLIST = ( # Blacklist categories, whose tree_path
     r'^blogs', # matches '^blogs'
    )



    Product's homepage

    Requirements:

    · Python
    · Ella

      


    TAGS:

    category listing | change behavior | Ella | category | listing

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM