Created
January 27, 2013 07:39
-
-
Save hissy/4647258 to your computer and use it in GitHub Desktop.
[concrete5] Hardcoded Search block only search in current language site tree
This file contains 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
<?php | |
Loader::model('section', 'multilingual'); | |
$ms = MultilingualSection::getCurrentSection(); | |
if (is_object($ms)) { | |
$lang = $ms->getLanguage(); | |
$search = BlockType::getByHandle('search'); | |
$search->controller->title = t('Site Search'); | |
$search->controller->buttonText = t('Search'); | |
$search->controller->baseSearchPath = $ms->getCollectionPath(); | |
$search->controller->searchUnderCID = $ms->getCollectionID(); | |
$search->controller->resultsURL = '/' . $lang . '/search'; | |
$search->render('view'); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment