I'm trying to create a submission page at the following URL structure
/campaigns/this-is-a-test-creation/submissions
As you can see /campaigns/
is the Channel and the /this-is-a-test-creation/
is the entry slug. I'm trying to currently set up my page using routing and fetch the related entry, but I'm having difficulties.
My route in the CP is set up as follows and works.
/campaigns/{slug}/submissions
My code to fetch the relating entry doesn't
{% set entry = craft.entries.section('campaigns').slug('craft.app.request.getSegment(3)').one() %}
{{ entry.title }}
This returns:
Impossible to access an attribute ("title") on a null variable.