Hallo,
ich schreibe mit dem Hook Urls in eine Sitemap.xml, soweit so gut. Ich habe vor kurzen eine Subdomain angelegt (Multi-CMS) in der auch eine sitemap-seikte2.xml erzeugt wird.
Jetzt habe ich festgestellt das alles was ich über den Hook einfüge in beiden Dateien steht.
PHP-Code:
/* add tourneen to search & sitemap */
public function getSearchableTourneen($arrPages, $intRoot=0, $blnIsSitemap=false){
$arrRoot = array();
$bands = array();
if($intRoot > 0){
$arrRoot = $this->Database->getChildRecords($intRoot, 'tl_page');
}
$objModule = ModuleModel::findByType('tourArchiv');
if($objModule !== null) {
while($objModule->next()) {
if($objModule->jumpTo) {
$bands = StringUtil::deserialize($objModule->fs_band);
if(is_array($bands)) {
$fields = array('published=?','band IN('.implode(',',$bands).')');
$values = array(1);
} else {
$fields = array('published=?');
$values = array(1);
}
$objContent = ContentModel::findByModule($objModule->id);
if($objContent !== null) {
while($objContent->next()){
$artikel = ArticleModel::findById($objContent->pid);
$intContentRoot = PageModel::findWithDetails( $artikel->pid );
if($intContentRoot !== null) {
$domain = ($intContentRoot->rootUseSSL ? 'https://' : 'http://') . ($intContentRoot->domain ? $intContentRoot->domain : \Environment::get('host')) . TL_PATH . '/';
$tourneen = FsConcertTourneenModel::findby($fields,$values,array('order' => 'year DESC, id DESC'));
if($tourneen !== null) {
while($tourneen->next()){
$alias = $this->generateFrontendUrl(PageModel::findPublishedByIdOrAlias($objModule->jumpTo)->row(), "".($GLOBALS['TL_CONFIG']['useAutoItem'] ? '/' : '/items/').$tourneen->alias);
$arrPages[] = $domain.$alias;
}
}
}
}
}
}
}
}
return $arrPages;
}
Ich dachte damal immer das diese stelle das regelt:
PHP-Code:
$domain = ($intContentRoot->rootUseSSL ? 'https://' : 'http://') . ($intContentRoot->domain ? $intContentRoot->domain : \Environment::get('host')) . TL_PATH . '/';
Aber scheinbar ist dies ja nicht so. Habe jetzt auch nichts gefunden wie Contao das selbst im Core regelt
Hat das Problem noch jemand oder ist eventuell jemanden aufgefallen ?
Lesezeichen