5.7 Routing layer / page location

Permalink
Hi,

I don't know if the page paths implementation in 5.7 is the final but are there any plans to touch that functionality? Some SEO-aware clients have argued that having shorter URLs would be better for the SEO ranks of some specific pages. Might be true or might not, but anyways, I think it would be great if the core was flexible enough to allow this.

What I mean in particular is e.g. that in the sample content installation, it would be possible to set the "Contact Us" page's URL to site.com/contact-us. Hierarchically that page would still be under the "About" page but just the URL would change.

Are there any plans to make this possible?

Antti / Mainio

Mainio
View Replies:
Shotster replied on at Permalink Reply
Shotster
> What I mean in particular is e.g. that in the sample content
> installation, it would be possible to set the "Contact Us" page's
> URL to site.com/contact-us. Hierarchically that page would still
> be under the "About" page but just the URL would change.

With the new routing system, it shouldn't be difficult to programmatically create a new route to an existing page, but that gives you the same content at two different URLs (which I realize is not exactly what you're asking). In app.php, for instance, you could do something like...

Route::register('/contact-us', function() {
   $p = Page::getByPath('/about/contact-us');
   Request::getInstance()->setCurrentPage($p);
   echo $p->getController()->getViewObject()->render();
});


-Steve
Mainio replied on at Permalink Reply
Mainio
Yeah, I know that. I could even do something like that with 5.6.

But it does not take sitemap.xml, search and automatic linking to the page (e.g. navigations) into account which makes it basically of no use in this case.
Shotster replied on at Permalink Reply
Shotster
> But it does not take sitemap.xml, search and automatic linking to
> the page (e.g. navigations) into account which makes it basically
> of no use in this case.

Very true. I suppose you could just use mod_rewrite if all you wanted was an alternate URL to a resource.

So basically, you'd like to decouple canonical URLs from site hierarchy?

-Steve
Mainio replied on at Permalink Reply
Mainio
>> So basically, you'd like to decouple canonical URLs from site hierarchy?

Exactly, not alternate URLs.
Mainio replied on at Permalink Reply
Mainio
Anyone that would like to share some thoughts on this?

The 5.7 related threads do not seem active currently, lots of discussions with 0 answers and also dead discussions... People only get active when something comes out from the core team and it's usually too late at that time to push new useful features to the core. And this feature improvement is also of that scope that would never get approved to the core through github if we implemented this in-house and provided it as a pull request...
JohntheFish replied on at Permalink Reply
JohntheFish
I have found the best way to get discussion going on 5.7 is to start an issue on github. Page type and area name insanity got next to no response on this forum. Its now up to 40 on Github.
Mainio replied on at Permalink Reply
Mainio
Thanks for the tip John!

Posted there:
https://github.com/concrete5/concrete5-5.7.0/issues/350...

(did not notice your reply before, did not get an email notification)