This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Journalt
Journalt

I have a list of posts that are paginated correctly using :

 {{ posts.links()|raw }}

Now I have a search form wich displays a list of posts as results. Those results are paginated too, but I can't keep the keyword variable when going to page 2. This is my pagination code, but it doesn't seem to work :

{{ posts.appends(array('q' => Input::get('q'))).links()|raw }}

(Where $q is my keyword variable)

Any idea how to keep the keyword input in the links, so I get an URL like /search?q=mykeyword?page=2

moh.thabet200631375
moh.thabet200631375

use it like this {{members.appends({q: q,state:states_ids,area:areas_ids,tag:tags_ids}).render|raw }}

I added in the php section of the results page: function onStart(){ $this['q'] = request()->get('q'); $this['tags_ids'] = request()->get('tag'); $this['states_ids'] = request()->get('state'); $this['areas_ids'] = request()->get('area'); }

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.