Which correctly outputs the /branches/firstname_lastname but for some reason it says "You have included the Perch runtime in your page template. Please remove it - Runway will include it for you." so when i take the runtime out it defaults back to the branches/index.php page
Yeah thats what i have in the perch routes under the page settings, but do i include that in the href in the template or just include the slug on its own?
I think ive managed to get the routing to work but when you go to the page it says "You have included the Perch runtime in your page template. Please remove it - Runway will include it for you."
So if i remove the perch runway include from the doctype the page loads but for some reason it is using the branch.php master page template whereas it needs to be using the staff.php template but not sure how to dictate which master template it uses…
Ok, that sounds great - you should be able to output the same from here, should you not?
Im not quite sure how though as ive got the output of the collection using this template:
Which correctly outputs the /branches/firstname_lastname but for some reason it says "You have included the Perch runtime in your page template. Please remove it - Runway will include it for you." so when i take the runtime out it defaults back to the branches/index.php page
If the link is correct, then you don't need to worry about the template.
The issue then becomes the route and the page it's using. Does your slug literally have an underscore in it?
No i didnt use an underscore at i find sometimes it doesnt work but i havent really used slugs like this before
Can you give an example of a real value?
Well i have the slug taking the info from the staff name so someone called john smith the output would be john-smith.
Then in the route i have the ID of that slug like: [slug:staffslug]
Your full route should be:
Is that what you have?
Yeah thats what i have in the perch routes under the page settings, but do i include that in the href in the template or just include the slug on its own?
The href looks to be correct as you have it.
Hmmm its still going to a 404 error.
Debug message from the page but doesnt really say much
That error is for the page
/branches/john-smith
?Correct
Generally is routing working for you on the site?
Im not really sure, this is the first time ive used it
What does the Pages > Routes screen show in the control panel?
pattern: branches/[slug:staffslug]
Page: /branches/birmingham/index.php
order: 1
Ok. I'm not quite sure how to help at this point. It looks like it should be working to me.
Hmmm okay, i will have a look at it and go through the documentation and stuff again, thanks for all your help!
Hi Drew, think ive got to the bottom of this,
I think ive managed to get the routing to work but when you go to the page it says "You have included the Perch runtime in your page template. Please remove it - Runway will include it for you."
So if i remove the perch runway include from the doctype the page loads but for some reason it is using the branch.php master page template whereas it needs to be using the staff.php template but not sure how to dictate which master template it uses…
That's based on which master page is selected for that page in the page options.