This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

zeeshan.mehtab18836
zeeshan.mehtab18836

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

zeeshan.mehtab18836
zeeshan.mehtab18836

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' }) }}
fredericomarinho16918

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.