By icecreamyou on
I'm building a module that adds a page with several tabs. Drupal requires that hook_menu define the "default" page twice, like this:
/**
* Implementation of hook_menu().
*/
function user_deco_menu($may_cache) {
$items = array();
if (!$may_cache) {
$items[] = array(
'path' => 'user_deco',
'title' => t('Decos'),
'description' => t('Shows a gallery of user_decos with the option to buy them.'),
'callback' => 'user_deco_gallery',
'callback arguments' => 'gallery',
'access' => user_access('buy user_decos'),
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'user_deco/gallery',
'title' => t('Gallery'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1,
);
}
return $items;
}
The result is that there are two URLs to access the same page. (Same goes for node/* and node/*/view, and many other pages in the Drupal ecosystem.) So, two questions.
- Is this a problem for SEO? I've read that Google, at least, does not penalize sites for having duplicate pages, so I doubt this is really an issue.
- Which page should the module link to: user_deco or user_deco/gallery, in order to comply with Drupal coding standards?
In regards to the second question, Drupal links the tab to user_deco. Is this a case where I should do it as core does it?
Comments
.
Pwolanin said on IRC to use user_deco. I don't really think the SEO question is that important since core does it this way and I'm pretty sure what I read about Google is right, so I guess this is resolved now.