We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question

link rel="canonical"

Is there a way to generate this automatically in Perch or does it have to be done manually?

Nigel Coath

Nigel Coath 1 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can use PerchSystem::get_page() to get the current page.

Sorry for being slow but where do I put this line and is it exactly as is?

And in your opinion is this still necessary as have read conflicting views?

Drew McLellan

Drew McLellan 2638 points
Perch Support

What does this output?

<?php echo PerchSystem::get_page(); ?>

It outputs everything after the domain e.g. /services/index.php but not the full url.

Before I go further do you think this is necessary site wide?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Necessary for what?

SEO best practice. Other than for blogs or index pages do you think its necessary?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

That isn't really something we can advise on :) I'd suggest seeing what Google are saying, their webmaster tools are very helpful for this sort of thing.