Keyword

Sort itemAuthorLatest in itemView by custom field

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 11 months ago #119300 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Sort itemAuthorLatest in itemView by custom field
I would follow a different approach

Is the case == user
do the custom ordering
else for all other cases
$query .= " ORDER BY ".$orderby;

Line 337 approx.

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

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

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 11 months ago #119301 by Gerben
Cheers Krikor for pushing me in the good direction.

Fixed it with this:

if ($task == 'user')
{

$query .= " ORDER BY i.neworder ASC";
}
else{

$query .= " ORDER BY ".$orderby;
}

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 11 months ago #119302 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Sort itemAuthorLatest in itemView by custom field
Congrats :)

Remember to back it up so you won't lose it.

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

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


Powered by Kunena Forum