how do i setup the kirby routing to to redirect the last part of the url on specific template.
http://www.example.com/support/some-topic-with-support-template
for template ‘support-topic’ should be (with a # hash)
http://www.example.com/support#some-topic-with-support-template
but other templates in same folder should not be redirected
http://www.example.com/support/do-not-redirect-me-since-i-have-different-template
ideally it would work on any depth in the folder tree.
http://www.example.com/some-topic-with-support-template
http://www.example.com/support/some-topic-with-support-template
http://www.example.com/blog/archive/some-topic-with-support-template
c::set('routes', array(
array(
'pattern' => array('(:any)'),
'action' => function() {
// compare if template is equal to 'support-topic' do that
// else do nothing
}
)
));