×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Display category of commented item in module

Display category of commented item in module 7 years 3 months ago #27467

  • josh
  • josh's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 6
Hi there - I am trying to display the category name of the item being commented on inside the latest comments module - is there a way to display the category name?
Sorry I also forgot to mention that I am using k2..
Thanks
The following user(s) said Thank You: lcentolamaren, hafruehlilake, eeforbespearl

Display category of commented item in module 7 years 3 months ago #27477

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Josh,
The module doesn't have such a function. You can achieve this with a template override and custom php code.
The reason I haven't added this into the module is performance. I know a lot of people who are showing the latest 100 comments! Yep, the last 100! And they have like 40 different categories. When we store the comment in the database, we don't store the category of the article. We just store the article_id. So once we have the comments, we would need to read the content table, then read the categories table. And that are queries and lost speed for little use.

Kind regards,
Daniel
The following user(s) said Thank You: lcentolamaren, hafruehlilake, eeforbespearl

Display category of commented item in module 7 years 3 months ago #27496

  • josh
  • josh's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 6
Hi Daniel
Thanks very much for the reply - no problem, I get that totally and understand that the trade off of speed isn't really worth the basic functionality.
The following user(s) said Thank You: lcentolamaren, hafruehlilake, eeforbespearl
  • Page:
  • 1
Time to create page: 0.140 seconds