Ich hatte diese Zeile hier jetzt vergessen:
Code: Alles auswählen
$seo = new rex_yrewrite_seo();
Code: Alles auswählen
echo $seo->getRobotsTag().PHP_EOL;
echo $seo->getHreflangTags().PHP_EOL;
echo $seo->getCanonicalUrlTag().PHP_EOL;
Code: Alles auswählen
$seo = new rex_yrewrite_seo();
Code: Alles auswählen
echo $seo->getRobotsTag().PHP_EOL;
echo $seo->getHreflangTags().PHP_EOL;
echo $seo->getCanonicalUrlTag().PHP_EOL;
Code: Alles auswählen
Warning: Illegal string offset 'url' in /users/.../www/redaxo/src/addons/url/lib/Url/Generator.php on line 436
Warning: Illegal string offset 'pathNames' in /users/.../www/redaxo/src/addons/url/lib/Url/Generator.php on line 436
Warning: in_array() expects parameter 2 to be array, string given in /users/.../www/redaxo/src/addons/url/lib/Url/Generator.php on line 436
Warning: Illegal string offset 'pathCategories' in /users/.../www/redaxo/src/addons/url/lib/Url/Generator.php on line 436
. . .
Code: Alles auswählen
// Detailpage
$projectDataId = UrlGenerator::getId();
if ($projectDataId != "") {
// Url-Addon overwrites
$urlseo = new \Url\Seo();
$meta_title = $urlseo->getTitle();
$meta_url = $urlseo->getCanonicalUrl();
}
Code: Alles auswählen
<?php
$currentLang = rex_clang::getCurrentId(); //REX5
$pxnewsPageId = 5; /*ID der Detailausgabeseite*/
?>
<div class="row">
<div class="large-12 columns">
<div class="px-section-title-bar">
<h2 id="news"><?php echo $labelResHomeListingTitle; ?></h2>
<div class="px-hr-subtitle-wrapper">
<hr class="section-one">
<div class="px-hr-subtitle">
<div class="subtitle-txt section-one"><?php echo $labelResHomeListingSubtitle; ?></div>
</div>
</div>
</div>
</div>
</div>
<?php
######################################################################################
### GET DATABASE CONTENTS ############################################################
######################################################################################
$query = rex_sql::factory()->getArray('SELECT * FROM '.rex::getTablePrefix().'px_news_articles WHERE releasedate <= NOW() AND status="'.intval(1).'" ORDER BY releasedate DESC LIMIT 3');
if (count($query)) {
?>
<div class="row" data-equalizer>
<!-- START NEWS LISTING -->
<?php
foreach ($query as $result) {
######################################################################################
### PREPAIR VARS FOR MULTILANG OUTPUT ################################################
######################################################################################
$cur_lang = rex_clang::getCurrentId();
$lang_db_title_part = 'title_lang';
$$lang_title = $lang_db_title_part.$cur_lang; // Create Var from to Vars
$cur_title = $result[$$lang_title];
if($cur_lang == 1){ //DE
$cur_date = $result['releasedate'];
$cur_date = date("d-m-Y", strtotime($cur_date));
}else{
$cur_date = $result['releasedate'];
}
######################################################################################
### GET CATEGORY NAME BY ID ##########################################################
######################################################################################
### GET CATEGORY TITLE NAME FOR CONNECT WITH CATEGORY TABLE
$lang_db_category_part = 'title_lang';
$$lang_category = $lang_db_category_part.$cur_lang; // Create Var from to Vars
$cur_category_row = $$lang_category;
$category_query = rex_sql::factory()->getArray('SELECT '.$cur_category_row.' FROM '.rex::getTablePrefix().'px_news_categories WHERE id = ?', [$result['category']]);
if (count($category_query)) {
$category_result = current($category_query);
$cur_category_name = $category_result[$cur_category_row];
}else{
$cur_category_name = 'N/A';
}
######################################################################################
### START PRINT LISTING OUTPUT #######################################################
######################################################################################
?>
<!-- START ITEM LISTING -->
<div class="small-12 medium-6 large-4 columns" >
<div class="px-listing-teaser-item-news" data-equalizer-watch>
<p>
<a href="<?php echo rex_getUrl($pxnewsPageId, '', ['id' => $result['id']]); ?>">
<span class="date-news"><?php echo $cur_date.' / '.$cur_category_name; ?></span><br>
<?php echo $cur_title;?>
</a>
</p>
</div>
</div>
<!-- END ITEM LISTING -->
<?php
}
?>
</div>
<!-- END NEWS LISTING -->
<?php
}else{
######################################################################################
### SHOW ERROR BOX ID NOTHING FOUND ##################################################
######################################################################################
$pxErrorMsg = $labelErrorSQL;
include './public/tpl/tpl.global.errorbox.php';
}
?>
Code: Alles auswählen
rex_getUrl('', '', ['news-id' => $id])