Forum

Thread tagged as: Problem, Runway, Blog

Changing Blog Post Page Path

Hi,

I'm working on a Runway site that was started by someone else, and we currently have the blog under the name 'articles' but we need to change it to 'more'.

So in settings we have:

Blog post page path: /articles/{postSlug} Slug format: %Y-%m-%d-{postTitle}

And my blog template pages are located in pages in a folder named 'articles'.

As it stands everything works fine, and when you visit a post it appears no problem with the URL something like:

https://mywebsite.com/articles/2017-03-21-my-article

But if I change the post page path in settings to:

/more/{postSlug}

And the name of the page templates folder to 'more', when I try to visit a post it goes to the page:

https://mywebsite.com/more/2017-03-21-my-article

But gives a 404 error. Is there something else I need to change that I've missed?

My diagnostic is:

Perch Runway: 2.8.34, PHP: 5.4.45, MySQL: 5.5.46, with MySQLi
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), perch_blog (5.0), perch_forms (1.8.3)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/fullfatwebsite/public_html/zenithcosmetic/perch
PERCH_CORE: /home/fullfatwebsite/public_html/zenithcosmetic/perch/core
PERCH_RESFILEPATH: /home/fullfatwebsite/public_html/zenithcosmetic/perch/resources
Image manipulation: GD
PHP limits: Max upload 25M, Max POST 128M, Memory: 256M, Total max file upload: 25M
F1: 6a33f95eca3667f9e0c39bf5ca2980fe
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/fullfatwebsite/public_html/zenithcosmetic
HTTP_HOST: zenithcosmetic.fullfatwebsitedesign.co.uk
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Thanks

Alex Bennett

Alex Bennett 0 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You also need to update the routes to those pages. Changing the path doesn't update the routes, it updates the setting used to generate links.

Thanks Rachel - I think I was missing that I needed to actually create a post page with the route in place!

Just another quick question - I'm using multiple blogs, so in this case 'Blog', 'News' and 'Offers' that all come under 'More', and at the moment my URLs all point to: more/post-name rather than more/news/post-name, more/offers/post-name etc. Is this possible to achieve with there being only the option to set one blog page path in settings?

Thanks for your time on this!

Actually, I just realised that I just need to configure the route differently for each post sub-page, but my issue is how to set up the URLs differently in the post_in_list_template.

So I've just created another called post_in_list_news.html and need to modify the url.

Currently it uses:

<a href="<perch:blog id="postURL" />">

but I just need the post name so I can append news/ in front and so I changed it in the template to:

<a href="more/news/<perch:blog id="postSlug" />">

And this works!