I'm currently using the following code for pagination:

        <a href="{pagination_url}">{pagination_page_number}</a>

Because of an addon I'm using, I need to modify the output of the {pagination_url} variable.

{pagination_url} outputs http://sitename.com/blog/P20, and I need to add a segment before blog.

I attempted to use the Find and Replace Plus addon, but due to the parse order, I'm not able to use the {site_url} variable to find/replace.

Is there an easier way to accomplish this?

2 Answers 2


If you just need to modify the part of the URL before the pagination segment (and your use case is relatively simple) you can use the paginate_base parameter on your entries loop (docs here):

{exp:channel:entries paginate_base="blog/foo"
        <a href="{pagination_url}">{pagination_page_number}</a>

Now your output should look like this: http://example.com/blog/foo/P20

  • I don't know how I overlooked that parameter, but this is exactly what I was looking for. Thanks!
    – Jon Horton
    Nov 26, 2012 at 16:51
  • No problem, happy to help...
    – Tom Davies
    Nov 26, 2012 at 16:58

If you're feeling brave, you can also head to:


All of the opening and closing elements are there and you can override them. Just make a note of those changes so you can restore them after an upgrade.

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.