HTML href - how to not rewrite GET parametrs -
i'm developing webpage , ran little trubble.
there list of users need paginate ?page=5
, need search. can't figure how set href users/list?search=test&st=on&pa=on&te=on
-> users/list?search=test&st=on&pa=on&te=on&page=5
can helps me? thanks, before.
code:
my pagination looks like:
<li> <a href="?page={{ pagination.next_page_number }}" aria-label="next"> <span class="glyphicon glyphicon-triangle-right" aria-hidden="true"></span> </a> </li>
and search form:
`
<form class="form-inline" method="get" action=""> <div class="form-group"> <div class="input-group"> <input type="text" class="form-control" placeholder="search for..." id="search" name="search" value="{{ search }}"> <span class="input-group-btn"> <button type="submit" class="btn btn-default">go!</button> </span> </div> </div> <div class="checkbox"> <label> <input type="checkbox" id="st" name="st" {% if st %}checked{% endif %}> students </label> </div> <div class="checkbox"> <label> <input type="checkbox" id="pa" name="pa" {% if pa %}checked{% endif %}> parents </label> </div> ... <button type="submit" class="btn btn-default">search</button> </form>
`
yes, way it. rank variables in order of importance. might move page variable beginning follows, either way works:
users/list?page=5&search=test&st=on&pa=on&te=on
Comments
Post a Comment