Router changes does not affect the template?

I tried to use this article to have the blog in the root folder, with routes:

http://getkirby.com/docs/advanced/routing#omitting-the-blog-folder-in-urls

However when I loop my children I donā€™t get the routed url but the old one:

<a href="<?php echo $item->url(); ?>">My link</a>

ā€¦gives meā€¦

<a href="http://mydomain.com/blog/my-blogpost">My link</a>

ā€¦when hoping forā€¦

<a href="http://mydomain.com/my-blogpost">My link</a>

The routing works well but the template urls does not. Is this the expected behavour? Can I make the template to be aware of the routs?

No replys. Here comes my hackish solution.

Instead ofā€¦

echo $item->url();

ā€¦do thisā€¦

echo $item->routed()->url();

Add a field method like thisā€¦

field::$methods['url'] = function( $field ) {
	if( $field->key == 'routed' ) {
		$url = str_replace(
			array(
				'/categories/',
				'/blog/'
			),
			array(
				'/',
				'/'
			),
			$field->page->url()
		);
		return $url;
	}
};

In my route the child pages to /categories/ and /blog/ are routed to the root. Now they will also be removed from the urls.

Itā€™s a little hackish but I think it works. Better solutions are welcome.