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:
<img src="<perch:content id="staffimage" />" />
<h5><perch:content id="staffname" /></h5>
<p><perch:content id="staffposition" /></p>
<a href="/branches/<perch:content id="staffslug" type="slug" />"> View Profile</a>
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.
href="/branches/<perch:content id="staffslug" type="slug" />"
Hmmm its still going to a 404 error.
Debug message from the page but doesnt really say much
 SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC, p.pagePath ASC
Using master page: /templates/pages/errors/404.php
Request time: 0.0691
Process time: 0.0584
[type] => 2
[message] => include(): Failed opening '/Users/Xland/Desktop/lebc/perch/templates/pages/errors/404.php' for inclusion (include_path='.:/Applications/MAMP/bin/php/php5.5.26/lib/php')
[file] => /Users/Xland/Desktop/lebc/perch/core/runway/start.php
[line] => 32
That error is for the page /branches/john-smith ?
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?
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.