Hi, so my index page is like this: /index?page=1 I'm using pagination, when 
the user clicks on the next page, it should become: /index?page=2

However if there is another var in the URL, it should carry that too

/index?page=1&name=test 
becomes 
/index?page=2&name=test

At the moment, I've done in a way where even if "name" doesn't exist, it 
will add it to the url anyway equalling "none" (from request.vars.name).
/index?page=1 
becomes
/index?page=2&name=none

Is there any way to only add the var if it does exist? 

This was a basic example, there are in fact 5 different vars in my real 
version, the only way I can think of is creating many IF statements. 
Anything simpler? 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to