On website there are pages of 2 conceptual types:
...
Code Block | ||||
---|---|---|---|---|
| ||||
'Fields' => Array ( /------------------- ..... ..... -------------------/ 'MetaNofollowNoindex' => Array ( 'type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ('nofollow' => 'NoFollow', 'noindex' => 'NoIndex', 'noarchive' => 'NoArchive', 'noimageindex' => 'NoImageIndex', 'noodp' => 'NoOdp', 'nosnippet' => 'NoSnippet'), 'default' => NULL ), /------------------- .......... -------------------/ ), |
...
Code Block | ||||
---|---|---|---|---|
| ||||
function PageInfo($params) |
...
{ |
...
$page =& $this->_getPage($params); |
...
switch ($params['type']) { |
...
|
...
..... case 'meta_nofollownoindex': $db_field = ' |
...
MetaNofollowNoindex'; |
...
|
...
|
...
break; |
...
|
...
//---------------!!!!!!!!!!!!!!!!!!!!!!
...
..... default: return ''; } $default = isset($params['default']) ? $params['default'] : ''; |
...
$val = $page->GetField($db_field); |
...
//---------------!!!!!!!!!!!!!!!!!!!!!!
...
if ($db_field == 'MetaNofollowNoindex') { |
...
return str_replace('|',', ',trim($val,'| |
...
//---------------!!!!!!!!!!!!!!!!!!!!!!
...
' |
...
)); |
...
|
...
} |
...
.....
return $val;
}
|
file categories_edit.tpl
<inp2:m_RenderElement name="inp_edit_checkboxes" prefix="c" field="MetaNofollowNoindex" title="la_fld_MetaNofollowNoindex" />
sql for update table Categories
ALTER TABLE TABLE_PREFIX.Categories ADD `MetaNofollowNoindex` VARCHAR(30) NULL DEFAULT NULL AFTER `RequireLogin`;
...