Fork me on GitHub

News pager appears on home page but not on category view  Bottom

  • Sorry for the bunch of questions I'm asking today! I've been at this upgrade now for about 14 hours and it's slow going. I'm working in a separate directory to keep our main site (PostNuke .762) up and running until I iron out the wrinkles in Zikula 1.0.

    The News pager appears at the bottom of the home page but not on a category view (there are many more stories that have that category than the 10 displayed). I've searched high and low for the template to modify and what code to add to display the pager to the category view, but I've struck out.
  • Check if your theme overrides the news_user_view.htm template, because is that one the responsible of the list. The weird thing is that if the pager appears in the homepage, should appear in the category list unless any conditional prevent that.

    Also, debug the template inserting <--[pndebug]--> in the first lines and check which values are in the $pager variable for both screens.

    --
    - Mateo T. -
    Mis principios... son mis fines
  • I found the news_user_view.htm template, of course, but how do I determine if my theme overrides that?

    Thanks for the hint on the debug variable! I used it in news_user_view.htm and noted that on the home page http://www.firsttrac…zikulafto/index.php it correctly recognizes the number of items:

    Code

    array (2)
    numitems => "5106"
    itemsperpage => 10


    but when looking at a category view such as http://www.firsttrac…rop=Topic&cat=10023 it incorrectly counts the number of items as 0:

    Code

    array (2)
    numitems => "0"
    itemsperpage => 10


    That's got to be something regarding how the categories and topics are constructed, no? Checking the categories_mapobj table there are 2370 stories assigned to topic 10023, which is "Resorts". Here's my categories list:

    Code

    Root category
       General
         ActiveStatus
         Gender
         Pending Status Basic
           Approved
           Pending
         Pending Status Extended
         Title
         YesNo
       Modules
         FAQ
         global
         News
           Articles
           Features
             Equipment Features
             Event Features
             Other Features
             Resort and Destination Features
             Technique Features
         Pages
         Topics
           Equipment
           Events
           Resort and Destination Features
             Asia
             Australia and new Zealand
             Canada Eastern
             Canada Western
             Europe and Mediterranean
             South America
             U.S. Eastern
             U.S. Midwestern
             U.S. Western
           Resorts
           World Cup
       Users


    Using "Main" I categorize each story as an "Article" (news) or a "Feature". If it's a Feature I choose from "Equipment Features," "Event Features," "Other Features," "Resort and Destination Features" or "Technique Features."

    Then with "Topics" I categorize each Article as "Equipment," "Events," "Resorts" or "World Cup" and if it was a "Resort and Destination Feature" I choose a Topic from "Asia," "Australia and New Zealand," "Canada Eastern," etc. to narrow the geographic focus.



    edited by: FirstTracks, Oct 25, 2008 - 12:40 PM
  • I don't know why I didn't think of this before, but I switched to Extralite and...same phenomenon. So it's not the theme, it has to be that the pager isn't getting the right number of articles passed to it. I suspect that it has something to do with the screwy articles/categories configuration passed to it by he way I had PostNuke .764 set up. I've just upgraded the database from scratch again, to solve another problem of orphaned articles, and I'm reluctant to screw around with categories unless someone can really tell me the proper way to do it.
  • lordevol

    Isn't it the same thing that we solved here: http://community.zikula.org/module-Forum-viewtopic-topic-55339-start-15.htm ?


    Hmmm...I sure hope so, I'll download that file when I get home tonight and try it.

    I saw that thread when I was looking for a solution before posting my problem here, but I got the impression that the problem being fixed there was getting news articles not marked to be displayed on the home page to still display in a category view.

    That's not my problem, per se -- my problem is getting the news pager to appear on anything other than the home page or index.php?module=News.

    For example, the pager does not appear index.php?module=News&func=view&prop=Topic&cat=10021 even though there are literally hundreds if not over 1,000 news articles in the database that have category 10021 for a topic. If I manually add "&page=2" to the end of that URL, page two of the articles list does appear. It just seems that the number of available articles being passed to the pager is zero, thus the pager does not appear on the page.
  • Yesssssssss!! lordevol, that did it! Thank you, thank you, thank you.
    icon_biggrin
  • I'm happy for you, I like zikula!
    But you should thank nestormateo he helped me to solve my problem,
    now if you know how to show the "most hit news" in homepege I will be very happy to read about it :)
  • Yes, thank you to both of you, as well as everyone else who has put up with my half-dozen topics over the past week and provided me with helpful advice. Although I've been around for a few years since I first migrated our site to PostNuke I've only popped in here on a few occasions when I've needed someone much smarter than me to help me solve a problem -- I've never known enough about PHP, mySQL, etc. to lend much assistance to anyone else. What struck me over the past week, however, is how pleasantly helpful everyone here has been. I truly appreciate it!

    And if I stumble by accident across a solution to your "most hit news" problem I'll be sure to let you know, but I'll also assure you that it could only happen by accident. icon_wink

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