I have a page /referral/CODE that I want to use the template referral. CODE is a dynamic part of the URL and is causing the page to load with style but the content does not display.

If I go to /referral/ the page and it's content loads fine with all the content. How can I ignore the dynamic CODE part of the URL, and have /referral/CODE use the referral template?

I have referral/index.md added to my pages folder as well as this line under routes: in my settings/routes.yaml file: /referral/* : referral.

Please help :)

Answered by Peter Rainer! Go to answer.