Forum
No routes visible under Routes tab
Hi there,
For some reason there are no routes being displayed under my Routes tab - never ever. The site's been up and running for some time now.
Strange...
Hi there,
For some reason there are no routes being displayed under my Routes tab - never ever. The site's been up and running for some time now.
Strange...
That is strange. Can you give an example of one you've set?
Right, I got it. I need to add it manually ... I was confused by this statement:
"By default, the router will map any incoming request to a page with the same URL. Adding an additional routes to the page is done through the Perch control panel."
So how should I convert this: /blog/archive.php?tag=google into that /blog/tag/google using routes?
I'm sorry this is not my cup of tea...
PS: To have a video tutorial one day with some examples would be amazing!
If you have
archive.php
added as a page, in the options use:Alright, I have set it up: https://s30.postimg.org/hbu3d16ch/perch_routes.png
What would be the next step for transforming /blog/archive.php?tag=google into that /blog/tag/google ? I think I'm missing something. As /blog/tag/google still returns 404
Cheers,
Is
/blog/index.php
a page out on your site, or have you set it up as a master page?First case: post, archive and blog have their files.
I Runway you'll want to make a master page, and then base your pages on those master pages.
You can find the concepts explained here: https://docs.grabaperch.com/runway/structure/
Alright, I think I'm getting there. I'm still not able to see my posts (404).
Can you tell me Drew if I missed smething here:
/templates/pages/blog/post.php
![/templates/pages/blog/post.php]https://i.imgsafe.org/2350cb1.png)
routes ![routes]https://i.imgsafe.org/c043592.png)
slug ![slug]https://i.imgsafe.org/e9cc0d4.png)
I have set blog, post, archive as master pages. The default token is:
Thanks a lot,
What's the URL when you get a 404?
It goes like this: mydomain.com/blog/my-post-title
Thanks a lot
This pattern won't match:
It's assuming a date like
2016-03-01-my-post-title
I don't think you need a custom token with that URL format, you can just use
slug
.Where you have
that could just be
Alright, I have changed all instances of
to
I managed to see one (only one) of my posts at: mydomain/blog/post directory. It's also visible at /blog/post?p=any-value .I guess there is still something missing in my config.
What does the debug output for your page?
debug log from /blog/post?p=my-post-slug
Perch diagnostics
I hope that helps
What about for
/blog/post/my-post-slug
, as I presume that's what you want to get configured?(please don't post the HTML, it's really hard to read. The text output is ideal.)
Alright, I got to the bottom of this!
BTW how would I change this
So it displays URL like so ( %F )
You'd do it the other way around. Change the link and then update the route with a new pattern to match.
Thank you Drew, all sorted :)