recherche dans sous-page de blog ou news avec data_module

This commit is contained in:
deltacms 2024-04-02 11:34:32 +02:00
parent 86db68efeb
commit 043df09f8f
1 changed files with 4 additions and 4 deletions

View File

@ -302,11 +302,11 @@ class search extends common {
}
// Articles d'une sous-page blog ou de news
if ($this->getData(['page', $childId, 'moduleId']) === 'blog' || $this->getData(['page', $childId, 'moduleId']) === 'news'
&& $this->getData(['module',$parentId,'posts']) )
if (($this->getData(['page', $childId, 'moduleId']) === 'blog' || $this->getData(['page', $childId, 'moduleId']) === 'news')
&& $this->getData(['data_module',$childId,'posts']) )
{
foreach($this->getData(['module',$childId,'posts']) as $articleId => $article) {
if($this->getData(['module',$childId,'posts',$articleId,'state']) === true) {
foreach($this->getData(['data_module',$childId,'posts']) as $articleId => $article) {
if($this->getData(['data_module',$childId,'posts',$articleId,'state']) === true) {
$url = $childId . '/' . $articleId;
$titre = $article['title'];
$contenu = ' ' . $titre . ' ' . $article['content'];