1

When using the paginate_base parameter with exp:low_search:results (I'm also using Structure, Freebie) any time I reference the channel short_name either as {segment_1}, {freebie_1}, {channel_short_name} or even hard code the channel short name, the pagination URL has the search query in the wrong place.

Using:

paginate_base="{freebie_1}/{freebie_2}/{freebie_3}/{freebie_4}/{freebie_5}/{freebie_6}"

When the URL is:

http://domain.com/yarn/title/asc/1/brand/dmc/P1?keywords=test

the generated pagination URL is:

http://domain.com/yarn/?keywords=yarntitle/asc/1/brand/dmc/P2?keywords=yarn

But if I hardcode a non-existing channel_short_name at {segment_1} - for example: foo

paginate_base="foo/{freebie_2}/{freebie_3}/{freebie_4}/{freebie_5}/{freebie_6}"

the generated pagination URL path is correct! Eg:

http://local.tricotshop.co.uk/foo/title/asc/1/brand/dmc/P2?keywords=test

But if I use a standard exp:channel:entries loop (without the results query), the generated pagination URL is correct.

Can anyone tell me why this is happening and how I can fix it please?

Thanks!

4
  • What happens when you set the Encode query setting to Yes? Does that produce correct URIs?
    – Low
    Commented Sep 20, 2013 at 10:35
  • Yes, it produces the correct URIs - but without the encoded search query.
    – Matt Ellis
    Commented Sep 20, 2013 at 12:47
  • Care to take this to getsatisfaction.com/low ? I need more info...
    – Low
    Commented Sep 20, 2013 at 12:55
  • Yep, no probs - getsatisfaction.com/low/topics/…
    – Matt Ellis
    Commented Sep 20, 2013 at 13:05

1 Answer 1

1

Basically I was using freebie segments to dynamically add sorting and ordering parameters. Low took a look at the site and recommended that the better (and correct!) way of dynamically adding the sorting and ordering parameters in Low Search is to build the URL and include them in the query. This can be done numerous ways, but the end result looks something like:

domain.com/channel?orderby=date&sort=desc&limit=15&custom_field=foo

Great product, great support. Will definitely use again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.