Created
November 29, 2017 07:06
-
-
Save CB9TOIIIA/774db8c148558366ff2fec9216986d01 to your computer and use it in GitHub Desktop.
Правка категории - закрытие индексации страниц blog_item
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ______ _ _____ _ _ | |
// | ____| (_) / ____| (_) | | | |
// | |__ _ __ __ | | __ _ _ __ ___ _ __ _ ___ __ _ | | | |
// | __| | | \ \/ / | | / _` | | '_ \ / _ \ | '_ \ | | / __| / _` | | | | |
// | | | | > < | |____ | (_| | | | | | | (_) | | | | | | | | (__ | (_| | | | | |
// |_| |_| /_/\_\ \_____| \__,_| |_| |_| \___/ |_| |_| |_| \___| \__,_| |_| | |
$cstart = JFactory::getApplication()->input->get('start','','string'); | |
$climitstart = JFactory::getApplication()->input->get('limitstart','','string'); | |
if (strlen($cstart) > 0 || strlen($climitstart) > 0) { | |
$document = JFactory::getDocument(); | |
$document -> setMetaData ('robots', 'noindex, follow'); | |
$document->addCustomTag('<link rel="canonical" href="'.JURI::current().'"/>'); | |
if ($climitstart == 0 || $cstart == 0) { | |
JFactory::getApplication()->redirect(JURI::current()); | |
} | |
} | |
// ______ _ ______ _ _____ _ _ | |
// | ____| | | | ____| (_) / ____| (_) | | | |
// | |__ _ __ __| | | |__ _ __ __ | | __ _ _ __ ___ _ __ _ ___ __ _ | | | |
// | __| | '_ \ / _` | | __| | | \ \/ / | | / _` | | '_ \ / _ \ | '_ \ | | / __| / _` | | | | |
// | |____ | | | | | (_| | | | | | > < | |____ | (_| | | | | | | (_) | | | | | | | | (__ | (_| | | | | |
// |______| |_| |_| \__,_| |_| |_| /_/\_\ \_____| \__,_| |_| |_| \___/ |_| |_| |_| \___| \__,_| |_| | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment