0

I am using this code inside the exp:tag:entries-loop to generate pagination:

{tag_paginate}
                {tag_pagination_links}
                    <div class="col-md-offset-3 text-center"><!-- col-md-offset-3 -->
                    <ul class="pagination">
                        {first_page}
                            <li><a href="{pagination_url}" class="page-first">Erste Seite</a></li>
                        {/first_page}

                        {previous_page}
                            <li><a href="{pagination_url}" class="page-previous">Vorige Seite</a></li>
                        {/previous_page}

                        {page}
                            <li {if current_page}class="active"{/if}><a href="{pagination_url}" class="page-{pagination_page_number}">{pagination_page_number}</a></li>
                        {page}

                        {next_page}
                            <li><a href="{pagination_url}" class="page-next">Nächste Seite</a></li>
                        {/next_page}
                    </ul>
                </div><!-- /col-md-offset-3 -->
                {/tag_pagination_links}
                {/tag_paginate}

The variable pagniation_page_number is not parsed, the same for the variable page - see screenshot attached: Screenshot of broken pagination links

Could you please give me a hint how this could be fixed? Thanks!

2
  • What version of Tag and EE are you using? Please provide exact version numbers. This worked on our side: if it isn't on yours, can you provide your full template code? Is your {exp:tag:entries} code wrapped in another tag?
    – Solspace
    Commented Apr 2, 2015 at 9:57
  • EE v2.8.1 - Build Date: 20140314, Tag 4.2.8 - The exp:tag:entries-tag is not wrapped inside another tag, it's a separate embed-template. I have sent it to you via Solspace Helpdesk-ticket.
    – BNetz
    Commented Apr 2, 2015 at 17:56

2 Answers 2

1

Ok - the problem was trivial. As you can see in the template-code above I just missed a slash. This one

{page}
   {pagination_url}{pagination_page_number}
{page}

just has to be replaced with

{page}
   {pagination_url}{pagination_page_number}
{/page}

It was worked out by the excellent and engaged guy from Solspace - thanks a lot!

0

This is also issue with EE pagination, which Tag uses: if you use the same URL, eg http://example.com/entries/two+apples with pagination in {exp:channel:entries}, the pagination URL can become http://example.com/entries/two apples. Spaces in URLs render as %20 in the address bar, which is the URL entity equivalent of a space.

There is possibly a way to prevent + to convert to a space by making trial-and-error changes in .htaccess, but another method could be to enable PHP in your templates and put a search & replace function to convert spaces to + in pagination urls:

<?php echo str_replace(' ', '+', '{pagination_url}'); ?>
1

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.