Pagination arguments in page url generation

Hi all,
In the following code snippet of pagination plugin not working with ‘and collection.params.pagination’. When i remove this, pagination works.

{# Render the pagination list #}
{% if config.plugins.pagination.enabled and collection.params.pagination %}
{% include ‘partials/pagination.html.twig’ with {‘base_url’:page.url, ‘pagination’:collection.params.pagination} %}
{% endif %}

What I’m missing to add in this snippet?

You are probably not enabling pagination in your collection. see this section in the docs

Thanks for reply. I hope you are asking in Markdown page, if it is, I enabled in as follows -
items: '@self.children
by: header.modified
dir: desc
pagination: true
limit: 30