Quote from: terrybarth at Mar 07, 2014, 05:07 PMIs there a way to set default values or are they already set?
On the findability tab, the pull down for inclusion for search engines is blank. If my client creates a new page and doesn't check this what is the default value?
On the googlesite map tab, the inclusion in the googlesite map appears to be do not include. Same question is the default to Not include. Can we change this?
I'm concerned that some clients will not always remember to visit this tab or know what any of it means.
Thanks for a great addon!
Terry
when I have a look at
https://github.com/Sterc/SEOTab/blob/master/core/components/stercseo/elements/plugins/stercseo.plugin.php it seems that default values are set like this:
if(empty($properties)){
$properties = array(
'index' => '1',
'follow' => '1',
'sitemap' => '1',
'priority' => '0.5',
'changefreq' => 'weekly',
//'urls' => $modx->fromJSON($_POST['urls'])
);
}
so as far as I can guess, by default pages will be indexed, followed and included in the sitemap =)
Quote from: sonicpunk at Apr 10, 2014, 04:13 PMI added an old URL to the 301 Redirect list, but when I call up the old url, it does not lead the user to the article. It directs them to the parent resource of the article.
I am using it with Articles. Anyone have an idea?
this has it's source probably in the following section of the above linked plugin
case 'OnPageNotFound':
$convertedUrl = str_replace('/', '_/', ltrim($_SERVER['REQUEST_URI'], '/'));
$alreadyExists = $modx->getObject('modResource', array(
'properties:LIKE' => '%"'.$convertedUrl.'"%'
));
if($alreadyExists){
$url = $modx->makeUrl($alreadyExists->get('id'));
$modx->sendRedirect($url, 0, 'REDIRECT_HEADER', 'HTTP/1.1 301 Moved Permanently');
}
break;
// maybe you can add some debugging code to check what is passed, like:
case 'OnPageNotFound':
$convertedUrl = str_replace('/', '_/', ltrim($_SERVER['REQUEST_URI'], '/'));
$modx->log(modX::LOG_LEVEL_ERROR, '$convertedUrl = ' . $convertedUrl); // add this to see what's passed
$alreadyExists = $modx->getObject('modResource', array(
'properties:LIKE' => '%"'.$convertedUrl.'"%'
));
if($alreadyExists){
$url = $modx->makeUrl($alreadyExists->get('id'));
$modx->sendRedirect($url, 0, 'REDIRECT_HEADER', 'HTTP/1.1 301 Moved Permanently');
}
break;