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

TOPIC:

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

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.

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

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

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?

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

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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 following user(s) said Thank You: admin

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

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

  I am so so so looking forward to see how far this can go. Seems like the skies the limit at the moment.
Kevin (Forum) 

Get Started