Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Change sort direction in view=category

Change sort direction in view=category 2 months 2 weeks ago #26191

  • jose45
  • jose45's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 47
  • Karma: 1
  • Thank you received: 6
hi,

I don't want to have the latest events at the end, but at the top / at the beginning, in
com_jem&view=category. Where can I change a search, to insert an "ORDER By ... DESC"?
I can't find anything at the moment - e.g. in the default_events_table.php or in other ???

I have to show all of a category, because only all are to be found by J!'s com_search, but not archived once.
Otherwise I might only show the current ones.

best, jose

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

Change sort direction in view=category 2 months 1 week ago #26195

  • jojo12
  • jojo12's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 3074
  • Karma: 45
  • Thank you received: 322
it must be in the /models/category.php
5.5.5-10.0.30-MariaDB-0+deb8u1
PHP 7.2.9 on different sites
Apache
JEM 2.3.0dev 2.0M and specials with Joomla! 3.9.3 stable on livesites
ja_simply, ja_purity_iii, multilingual DE EN IT FR
The following user(s) said Thank You: jose45

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

Change sort direction in view=category 2 months 1 week ago #26196

  • jose45
  • jose45's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 47
  • Karma: 1
  • Thank you received: 6
:-) thank you!

from path
...&view=category&id=2:events2&Itemid=48
file
components/com_jem/models/category.php
in
protected function populateState($ordering = null, $direction = null)
line about 152 changing ASC
$filter_order_DirDefault = 'ASC';
to DESC

its possible to place therefor an override?
e.g.
templates/name/code/com_jem/models/category.php
doesn't work


jose

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

Change sort direction in view=category 2 months 1 week ago #26201

Pretty sure models override will not work in J!3.x, this is version 4 feature. Your option will be to modify your local JEM version files (and remember the mod if upgrading JEM) or use one of the override plugins.

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

Last edit: by jojo12. Reason: models not modules

Change sort direction in view=category 2 months 2 days ago #26215

because only all are to be found by J!'s com_search, but not archived

Sounds like a JEM search plugin functionality can be improved by optionally including archived events in search results?

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

  • Page:
  • 1
Time to create page: 0.229 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.