Welcome, Guest
Username: Password: Remember me

TOPIC: Setting order, direction, limit via url query

Setting order, direction, limit via url query 17 Jun 2013 17:44 #7520

  • jhallock
  • jhallock's Avatar
  • Offline
  • Senior Member
  • Posts: 43
  • Thank you received: 1
  • Karma: 0
I have figured out that I can set the filters and the limit of a list view using the query portion of the url:
?filter.field=value&limit=20

How can I/is it possible to set the order field/direction in the same way?

I have tried
?list.ordering=field&list.direction

But that does not work.


Also, when I set the limit via the url - it changes to the pagination across my entire component. I would like to be able to provide a link where limit=0 to display all the records when accessing the view via that link, but leave the global limit set to what the user has set in pagination footer.

Thanks for the help.
The administrator has disabled public write access.

Re: Setting order, direction, limit via url query 17 Jun 2013 17:59 #7522

  • jhallock
  • jhallock's Avatar
  • Offline
  • Senior Member
  • Posts: 43
  • Thank you received: 1
  • Karma: 0
Ok,l have discovered that you can set the filter order and direction using:
?filter_order=field&filter_order_Dir=ASC


Still, I would like these values to be "sticky" (not affect the "default" state values) when they are called through the URL. Is this possible?
The administrator has disabled public write access.

Re: Setting order, direction, limit via url query 17 Jun 2013 19:23 #7532

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Hi there,

I think that you'll probably want to look into state vars... Essentially, state vars are just session data. Please see joomla docs here for info: docs.joomla.org/How_to_use_user_state_variables

Hope it helps,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.
The following user(s) said Thank You: admin
Time to create page: 0.169 seconds

Get Started