/ Published in: PHP
URL: www.marlux.com
For our project, this code had been implemented in the theme template.php
Expand |
Embed | Plain Text
function yourtemplate_preprocess_html(&$vars) { // get the request parameters $canon = 'http://www.marlux.com' . $reqParams[0]; // create a canonical object '#type' => 'html_tag', '#tag' => 'link', 'name' => 'canonical', 'content' => $canon, ), ); // add the canonical object to the html head drupal_add_html_head($canonical,'canonical'); }
You need to login to post a comment.
