On website there are pages of 2 conceptual types:
- pages that makes sense for robots (e.g. Google) to index (show in search results)
- pages, that doesn't make to index (e.g. "No Permissions", "Form Submitted Template")
For later page category it makes sense to add following into <head>
:
...
Code Block |
---|
language | xml |
---|
title | /themes/advanced/platform/elements/html_head.elm.tpl |
---|
|
<inp2:m_if check="c.currentst_FieldPageInfo" nametype="MetaKeywords"><metameta_nofollownoindex">
<meta name="Keywordsrobots" content="<inp2:c.currentst_PageInfo nametype='MetaKeywordsmeta_nofollownoindex'/>"/><>
</inp2:m_if> |
Code Block |
---|
language | phpxml |
---|
title | /core/unitsadmin_templates/categories/categories_configedit.phptpl |
---|
|
'Fields'<div id="scroll_container">
Array (
/------------------- <table class="edit-form">
.....
<inp2:m_RenderElement name="inp_edit_checkboxes" prefix="c" field="MetaNofollowNoindex"/>
.....
<!-- custom fields: begin -->
<inp2:m_include t="incs/custom_blocks"/>
<inp2:cf.general_PrintList render_as="cv_row_block" SourcePrefix="c" value_field="Value" per_page="-1" grid="Default" />
<!--------------/
custom fields: end -->
<inp2:m_RenderElement name="inp_edit_filler"/>
</table> |
Code Block |
---|
|
ALTER TABLE {TABLE_PREFIX}Categoies ADD `MetaNofollowNoindex` VARCHAR(30) NULL DEFAULT NULL;
|
Code Block |
---|
language | php |
---|
title | /core/units/categories/categories_config.php |
---|
|
'Fields' => array(
.....
'MetaNofollowNoindex' => Array array(
'type' => 'string',
'formatter' => 'kOptionsFormatter', 'options' => Array (array(
'nofollow' => 'NoFollow',
'noindex' => 'NoIndex',
'noarchive' => 'NoArchive',
'noimageindex' => 'NoImageIndex',
'noodp' => 'NoOdp',
'nosnippet' => 'NoSnippet',
),
'default' => NULLnull,
),
/------------------- ..... ..... -------------------/
), |
...
Code Block |
---|
language | php |
---|
title | /core/units/categories/categories_tag_processor.php |
---|
|
function PageInfo($params) |
...
...
$page =& $this->_getPage($params); |
...
switch ($params['type']) { |
...
.....
case 'meta_nofollownoindex':
$db_field = ' |
...
...
//---------------!!!!!!!!!!!!!!!!!!!!!!
...
break;
.....
default:
return '';
}
$default = isset($params['default']) ? $params['default'] : ''; |
...
$val = $page->GetField($db_field); |
...
//---------------!!!!!!!!!!!!!!!!!!!!!!
...
if ( $db_field == 'MetaNofollowNoindex' ) { |
...
return str_replace('|',', ',trim($val,'|')); |
...
...
//---------------!!!!!!!!!!!!!!!!!!!!!!
...
Related Tasks
Jira Legacy |
---|
server | System Jira |
---|
serverId | 513b375f-8291-3313-9d9f-704c39b1f915 |
---|
key | INP-1592 |
---|
|