Solution ideas needed - articles appear on page more than once

19 views
Skip to first unread message

StoneHammer

unread,
Sep 22, 2017, 3:19:26 AM9/22/17
to Joomla! General Development
I am working to build a news-type site. I am using a multicategory extension so that I can assign articles to multiple categories. This is extremely useful for a news site. For example, an article can be created, say one about the US Senate immediately bringing to the floor another Obamacare repeal bill, and assigned to the following categories: Breaking News, US Senate, Healthcare Issues, and Health. This allows the article to appear in each of those various news sections simultaneously, which is desired. However, what is not desired is that the same article might appear more than once on a page because of the multiple categories (since some of those categories/sections are present on the same page). I cannot change the fact that many categories are present on the same page - it is crucial to the design.

My requirement is that an article appear only once on the page. From top to bottom on the page, once an article is displayed, I don't want it displayed again. For example, the Breaking News section/category is at the top of the page; it retrieves the 5 most recent articles for the category Breaking News. Lower on the page is a Politics section (which also includes subcategories like US Senate). When the Obamacare article I mentioned earlier is published, it will be one of the five newest articles in the Breaking News category and will display there. Once it ages a bit and is no longer one of the newest five, it should display in the Politics section (assuming that not enough newer articles are created in the Politics category to age the Obamacare article out of display there). And so on.

I think ideally what I need is some way during each page load to put an article ID on a 'list' once it has been displayed. As articles are retrieved for each section, from the top of the page to the bottom, their IDs would need to include a 'not on the list' condition. And once the page load is completed for that viewer, the list would be flushed. A new 'list' would be used for each page load.

I'm new to Joomla so I have no idea of the starting point to accomplish something like that. I'm also open to other suggestions as long as they don't mandate a change in requirements.

Any comments on how to accomplish my idea or alternate solutions are sincerely appreciated.
Reply all
Reply to author
Forward
0 new messages