jonassiewertsen / statamic-livewire

A Laravel Livewire integration for Statamics antlers engine
91 stars 16 forks source link

Replace {{ links }} in Antlers with custom pagination #67

Closed Rbiggunz closed 3 months ago

Rbiggunz commented 4 months ago

Hello folks. I am trying to replace standard pagination links {{ links }}:

    <ul>
        {{ cars }}
            <li>{{ current_price }} EUR || {{ title }}</li>
        {{ /cars }}
    </ul>

    {{ links }}

    to custom:
    {{ if paginate.last_page > 1}}
        {{ partial:if_exists src="partials/pagination/custom_pagination" paginate=cars }}
    {{ /if }}

    or even more simple:
     {{ partial:if_exists src="partials/pagination/custom_pagination" paginate=cars }}

     but it does not work.

     Is it possible at all to achieve this?
marcorieser commented 4 months ago

What kind of error do you get if any?

The syntax looks a bit strange to me... are you missing the quotes in paginate=cars in the following?

{{ partial:if_exists src="partials/pagination/custom_pagination" paginate=cars }}
marcorieser commented 3 months ago

Closing this for now.