This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I have a page(activity-page) with following details
title = "Activity Page" url = "/activity/:slug"
This page shows the detail of an activity. I have an activity with slug = ballet I want to generate the URL for this page(which should be "/activity/ballet").
I dont want to manually build the links so I am want to use {{ |page }}
Please help my figure out how to pass parameter like slug to |page . When I put {{ 'activity-page'|page }} I get "/activity/default". I want some way to specify that I want to get URL against a certain activity slug
Thanks
Last updated
I finally found it. I am new to twig and octobercms so it was hard for me the reach the proper documentation. https://octobercms.com/docs/markup/filter-page
{{ 'activity-page'|page({ slug: 'ballet' }) }}
Maybe this could make your code better: https://octobercms.com/docs/database/traits#sluggable
1-3 of 3