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

TOPIC:

addWhere(), oddOrder() 10 Nov 2016 10:05 #14684

Hi Jocelyn,
are these database query overrides still working in forked views? ....
$model->addOrder('a.creation_date');
$model->addWhere('a.published', '1');
$model->setState('list.ordering', 'a.yourfield');
$model->setState('list.direction', 'desc');
Im working in the fork/views/myview/tmpl/default.php and fork/views/myview/tmpl/default_grid.php - trying to modify the collection data with this code - but it is being ignored.
Just call me Chris :)

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

addWhere(), oddOrder() 10 Nov 2016 19:42 #14689

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
You can only use those statements BEFORE the getItems() call.

So it doesn't work in the template.
You need to fork the view.
Coding is now a piece of cake
The following user(s) said Thank You: organicwebs

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

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

Amazing Tool !
And only tool I know that allows complete Scaffolding in terms of component creation. It really saves loads of time (actually much more than that). Simple architecture enables quick and painless changes at any time. Code is clean and consintent. It's just... what's the word... neat! :) Great work! You should definetely try this one!

pi_wo (JED)
         

Get Started