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.077 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started