laraveloctobercmsoctobercms-backendoctober-partial

Passing two parametres in url in octobercms


I must update a existing Octobercms project and it has url like this: <a class="page-link" href="{{ 'catalog/category/' | page({'category': category.slug'}) }}" >Все товары</a>

And url in category page is this: url = "/catalog/:category?"

How can I pass two parametres in url I tried this:
<a class="page-link" href="{{ 'catalog/category/' | page({'category': category.slug, 'second_parameter':'1'}) }}" >Все товары</a> and changed url in category page to url = "/catalog/:category?/:second_parameter? but it did not help? Who can help me?


Solution

  • The important thing is the page's Filename name, as shown in the screenshot

    enter image description here

    Use it and create a link as shown below, it will work.

    enter image description here

    {{ 'test-pg'|page({'param1': 'one', 'param2': 'two'}) }}
    

    Output

    enter image description here

    http://localhost:8000/test-pg/one/two
    

    if any doubt please comment.