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.

Bug with a category selecting and sorting code with page pagination

April 08, 2009 9:36pm

Subscribe [2]
  • #1 / Apr 08, 2009 9:36pm

    Murmann

    36 posts

    Sue Crocker pulled code for me to sort selectively display categories and display them in the right column.  There is a bug in it when I limit the number of entries displayed let’s say to 5 and then the blog paginates. when you click on the second page of entries the category sorter does not work.

    Here is when it works fine without page pagination (although when logged it as admin I get this error: Notice: Undefined variable: cat_name in /home/pmh2640/public_html/murmann/system/core/core.functions.php(637) : eval()‘d code on line 117)

    http://professor-murmann.info/index.php/weblog/courses/

    Here is a copy with the big bug. I already put in on the second page of entries so that you can see it readily.
    http://professor-murmann.info/index.php/weblog/courses_bug/P5/

    This is the code that Sue installed. She says it is from someone called MF in Germany. Can you help?


    **********Code*******************************

    
    									
  • #2 / Apr 18, 2009 6:30am

    Laisvunas

    879 posts

    Hi,

    It seems that you have deeply nested categories. To display them in their hierarchical order you can use exp:weblog:categories tag or exp:weblog:category_archive tag or
    Recursive Subcategories plugin.

  • #3 / Apr 18, 2009 6:38am

    Murmann

    36 posts

    Hi Laisvunas: The problem is that the hierarchical display works when I don ‘t all entries are displayed on one page but not when they are displayed across multiple pages. 
    here it works

    http://professor-murmann.info/index.php/weblog/courses/


    and here it does not

    http://professor-murmann.info/index.php/weblog/courses_bug/P5/

    I want it to work when entries of blog span across multiple pages.

  • #4 / Apr 18, 2009 6:42am

    Murmann

    36 posts

    I should add that the problem with http://professor-murmann.info/index.php/weblog/courses_bug/P5/ is that it displays all parent categories across my different blogs and not just this one courses.

  • #5 / Apr 18, 2009 6:48am

    Laisvunas

    879 posts

    It does not seem that either exp:weblog:categories tag or exp:weblog:category_archive tag or
    Recursive Subcategories plugin has any relation with pagination; so, some approach of those three should work.

    You use PHP for displaying nested categories; I do not see point for that.

  • #6 / Apr 18, 2009 7:02am

    Murmann

    36 posts

    Laisvunas: I am not a programmer. Could I hire you do get this to work correctly? Peter

  • #7 / Apr 18, 2009 7:58am

    Laisvunas

    879 posts

    Hi,

    I sent you a private message.

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

ExpressionEngine News!

#eecms, #events, #releases