Keyword

Article view jumps to different page with same category in category view

More
6 years 4 months ago #168399 by RT
Hello Joomla Community,

I copied and translated my german post , since I realized how this board seems to be a lot more frequented and I'm hoping for an increased chance of getting some help here.

I'm currently working on an Online News Viewer implemented with K2 in Joomla.

It shows news of 4 different newspapers, each with its own page to view current news. I created categories for any combination of newspapers (i.e. "alle newspapers", "newspaper 1 and newspaper 3", "only newspaper 1", etc.), since one newsitem may be relevant for different combinations of newspapers.
The module on the News Page then shows all news of categories where the current newspaper is part of the category.

But now I got a strange problem:
If I click on an article which belongs to various newspapers, it often leaves the URL of the newspaper with the category list and jumps to another newspaper for the item-view (probably the newspaper with the lowest ID).

For example:
www.bad-lippspringer-nachrichten.de , the article from 2nd july "Flutbrücke auf der Kreisstrasse[...]".
It will jump from the pages of the BLN newspaper to the pages of the PJ newspaper. (It is in the category "PJ + BLN" and is supposed to be shown in both newspapers)

And now my question:
Is there a way to teach K2 article view to just stay in the path the category view of the displayed article is in?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 4 months ago #168401 by Krikor Boghossian
Hello,
Mein Deutsch ist scheisse, so hier ist ein bischen besser.
This comes down to your menu structure.
Map each category into a separate menu item, and have the menu item 'retrieve' items from all these categories.
This way each item will be rendered with the correct URL, modules and category.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago - 6 years 4 months ago #168402 by RT
Hello Krikor,
Thanks for your reply.

Well, the idea of the summarized categories (i.e. "newspaper 1 + Newspaper 3") was to use that category on different menu items. ( In that case: the news page of newspaper 1 and the news page of newspaper 3 ), so I can't really make a seperate menu item for each of those.
But maybe I'm not understanding you correctly here.

The current state is as follows:
Each newspaper has an own menu, built like this:



The alias of each item is different for each newspaper. I also tried changing the title to be different (i.e. "Start2" and "Start3") for testing purposes, but it made no difference.

The category view has all the relevant (combo-)categories implemented like this:

Attachments:
Last edit: 6 years 4 months ago by RT.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 4 months ago #168414 by Krikor Boghossian
This way all of the items will be rendered through the home page, or if you have another menu item pointing to one or more of the categories.
The correct setup would be to keep the homepage as is and create a hidden menu,
In that menu, create a separate menu item with the correct alias as weill for each of the categories.
This will solve the layout and potentials module issues.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #168417 by RT
Ah, I see. So the problem stems from Menu Items which got Aliases pointing at the Category Views?
Because, in fact, we have those. We got another "Main Menu" for the Heggemannmedien Main Pages. That one is the root (for the breadcrumb for example) and has a Menu Item "Zeitungen"(Newspapers) with a Menu Item as Alias to each of the 4 newspapers (which then got those own Menus as shown before).

I'm not sure I understand your suggested setup though.
What would be the correct alias for the categories? And how would Joomla/K2 understand where to show the Item View of the various newspaper pages, if I create another independent hidden Menu?

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #168500 by RT
Hello Krikor,

Thank you for your support so far, and sorry if I might seem a bit dense in this matter.
But a little bit more information would be very appreciated.

So, up until now I created the item like this:


I guess you meant "item" as correct alias.
So .. which menu type would I need for it to work?
So far I tried adding another Category View, a Featured View and a Article View ( to some randomly picked article), but none of those worked. (Caches were cleared)
Attachments:

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 4 months ago #168526 by Krikor Boghossian
You are not dense, we all started from somewhere.
Lets start from the beginning.

Create a menu item towards the categories you want to show on your homepage and adjust its settings.
Create a menu and call it eg: hidden menu.
In that menu create a menu item for each of your K2 Categories.
Remember to double check your modules and have them shown or hidden on these new menu items.
Create some new menu items should you need them.

This way you will get a consistent layout, consistent modules across items and categories.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #170528 by RT
Hello Krikor!

First of all: Thanks for your continued help.
I have to admit, I did not see your last answer just until recently.
Back then I found some other way to repair the issue and stop those jumps between different newspapers.
Its a bit quick and dirty, but I decided to just correct the wrong routing with html redirects. Worked like a charm .. for some time.

But now K2 decided to pull another strange behaviour on me: For some reason every category, except "paderborner journal" or any combination category which includes the "paderborner journal" (i.e. "BLN + PJ"), routes to "[...]/artikel-bearbeiten/item/[...]" (or my guess where it would route in english: "[...]/edit-article/item/[...]") instead of just "[...]/item/[...]" as it should.
I mean .. it is already beyond me, why I would need additional hidden menu items to begin with, and why K2 can't just go to the item view from the same path the list is called, with no regard to the category. But this "edit-article"-problem seems even more bizarre to me.
I am not logged in, neither to the Frontend nor the Backend, and I tried various Browsers/Machines, still it always tries to throw me to the "edit-article"-subpage.
Of course I should be able to just fix that with the same quick'n'dirty redirect I used for the other issue. It is still puzzling me though, and I would feel a lot more confident about understanding the issue instead of just fixing it like that.

I tried out your hidden menu approach.
While it is true, that it will cause the item-views to be shown in that hidden menu category view, it still won't fix the issue for the "combination categories". Lets take "BLN + PJ" for example. If an article from that category is selected from "www.bad-lippspringer-nachrichten.de/start-bln", it is supposed to be shown in "www.bad-lippspringer-nachrichten.de/start-bln/item/[...]", while if the same article is selected from "www.paderborner-journal.de/start-pj" it should be shown in "www.paderborner-journal.de/start-pj/item/[...]".
While I ~could~ make a hidden Menu item for "BLN + PJ", I would have to decide for the design of one of the two newspapers, as I cannot show it conditionaly in its correct environment that way.

Well, for now I will "fix" the issue with the same solution I used for the other problem. But maybe you could take another look at it and help me realize where the problem even comes from. (You will still see the inccorect URLs on Mouseover from the article's title)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum