Renomme i18nContent en classesContent

This commit is contained in:
Fred Tempez 2023-09-05 21:14:04 +02:00
parent 19c70eec4c
commit df31319e1e
15 changed files with 78 additions and 345 deletions

View File

@ -913,7 +913,7 @@ class layout extends common
if (is_dir(self::DATA_DIR . $key)) {
$c++;
$location = helper::baseUrl() . 'language/content/' . $key;
$leftItem .= '<option name="' . $key . '" value="' . $location . '" ' . ($key === self::$i18nContent ? 'selected' : '') . '>' . $value . '</option>';
$leftItem .= '<option name="' . $key . '" value="' . $location . '" ' . ($key === self::$classesContent ? 'selected' : '') . '>' . $value . '</option>';
}
}
if ($c > 1) {

View File

@ -611,10 +611,10 @@ class core extends common
$inlineScript[] = $this->getData(['page', $this->getUrl(0), 'js']) === null ? '' : $this->getData(['page', $this->getUrl(0), 'js']);
// Importe le contenu, le CSS et le script des barres
$contentRight = $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$i18nContent) : '';
$contentRight = $this->getData(['page', $this->getUrl(0), 'barRight']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barRight']), self::$classesContent) : '';
$inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'css']);
$inlineScript[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barRight']), 'js']);
$contentLeft = $this->getData(['page', $this->getUrl(0), 'barLeft']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$i18nContent) : '';
$contentLeft = $this->getData(['page', $this->getUrl(0), 'barLeft']) ? $this->getPage($this->getData(['page', $this->getUrl(0), 'barLeft']), self::$classesContent) : '';
$inlineStyle[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'css']);
$inlineScript[] = $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']) === null ? '' : $this->getData(['page', $this->getData(['page', $this->getUrl(0), 'barLeft']), 'js']);
@ -632,7 +632,7 @@ class core extends common
$this->addOutput([
'title' => $title,
'content' => $this->getPage($this->getUrl(0), self::$i18nContent),
'content' => $this->getPage($this->getUrl(0), self::$classesContent),
'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']),
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
@ -658,7 +658,7 @@ class core extends common
: $this->getData(['page', $this->getUrl(0), 'metaDescription']);
// Importe le CSS de la page principale
$pageContent = $this->getPage($this->getUrl(0), self::$i18nContent);
$pageContent = $this->getPage($this->getUrl(0), self::$classesContent);
$this->addOutput([
'title' => $title,

View File

@ -170,7 +170,7 @@ class common
// Langue de l'interface sélectionnée
public static $i18nUI = 'fr_FR';
// Langues de contenu
public static $i18nContent = 'fr_FR';
public static $classesContent = 'fr_FR';
public static $languages = [
'az_AZ' => 'Azərbaycan dili',
'bg_BG' => 'български език',
@ -333,30 +333,30 @@ class common
// Déterminer la langue du contenu du site
if (isset($_SESSION['ZWII_CONTENT'])) {
// Déterminé par la session présente
self::$i18nContent = $_SESSION['ZWII_CONTENT'];
self::$classesContent = $_SESSION['ZWII_CONTENT'];
} else {
// Détermine la langue par défaut
foreach (self::$languages as $key => $value) {
if (file_exists(self::DATA_DIR . $key . '/.default')) {
self::$i18nContent = $key;
self::$classesContent = $key;
$_SESSION['ZWII_CONTENT'] = $key;
break;
}
}
}
\setlocale(LC_ALL, self::$i18nContent . '.UTF8');
\setlocale(LC_ALL, self::$classesContent . '.UTF8');
// Instanciation de la classe des entrées / sorties
$this->jsonDB(self::$i18nContent);
$this->jsonDB(self::$classesContent);
// Installation fraîche, initialisation des modules
if ($this->user === []) {
foreach ($this->dataFiles as $stageId => $item) {
$folder = $this->dataPath($stageId, self::$i18nContent);
$folder = $this->dataPath($stageId, self::$classesContent);
if (
file_exists($folder . $stageId . '.json') === false
) {
$this->initData($stageId, self::$i18nContent);
$this->initData($stageId, self::$classesContent);
common::$coreNotices[] = $stageId;
}
}

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$i18nContent, 0, 2); ?>">
<html prefix="og: http://ogp.me/ns#" lang="fr_FR">
<head>
<meta charset="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$i18nContent, 0, 2); ?>">
<html prefix="og: http://ogp.me/ns#" lang="fr_FR">
<head>
<meta charset="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo substr(self::$i18nContent, 0, 2);?>">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr_FR">
<head>
<meta charset="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$i18nContent, 0, 2); ?>">
<html prefix="og: http://ogp.me/ns#" lang="fr_FR">
<head>
<meta charset="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

View File

@ -41,8 +41,6 @@ class language extends common
public static $translateOptions = [];
// Page pour la configuration dans la langue
public static $pagesList = [];
public static $orphansList = [];
public static $pages = '';
// Liste des langues installées
@ -183,52 +181,6 @@ class language extends common
public function index()
{
// --------------------------------------------------------------------------------------------------
// Langues du site
// --------------------------------------------------------------------------------------------------
foreach (self::$languages as $key => $value) {
// tableau des langues installées
if (is_dir(self::DATA_DIR . $key)) {
if (
file_exists(self::DATA_DIR . $key . '/page.json') &&
file_exists(self::DATA_DIR . $key . '/module.json') &&
file_exists(self::DATA_DIR . $key . '/locale.json')
) {
if (file_exists(self::DATA_DIR . $key . '/.default')) {
$messageLocale = helper::translate('Langue par défaut');
} elseif (isset($_SESSION['ZWII_CONTENT']) && $_SESSION['ZWII_CONTENT'] === $key) {
$messageLocale = helper::translate('Langue du site sélectionnée');
} else {
$messageLocale = '';
}
self::$languagesInstalled[] = [
template::flag($key, '20 %') . '&nbsp;' . $value . ' (' . $key . ')',
$messageLocale,
template::button('translateContentLanguageLocaleEdit' . $key, [
'class' => file_exists(self::DATA_DIR . $key . '/locale.json') ? '' : ' disabled',
'href' => helper::baseUrl() . $this->getUrl(0) . '/locale/' . $key,
'value' => template::ico('pencil'),
'help' => 'Éditer'
]),
template::button('translateContentLanguageLocaleDelete' . $key, [
'class' => 'translateDelete buttonRed' . ($messageLocale ? ' disabled' : ''),
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/locale/' . $key,
'value' => template::ico('trash'),
'help' => 'Supprimer',
])
];
}
}
}
// Activation du bouton de copie
self::$siteCopy = count(self::$languagesInstalled) > 1 ? false : true;
// --------------------------------------------------------------------------------------------------
// Langues de l'UI
// --------------------------------------------------------------------------------------------------
// Langues attachées à des utilisateurs non effaçables
$usersUI = [];
$users = $this->getData(['user']);
@ -305,7 +257,7 @@ class language extends common
// Valeurs en sortie
$this->addOutput([
'title' => helper::translate('Langues'),
'title' => helper::translate('Langues de l\'interface'),
'view' => 'index'
]);
}
@ -361,113 +313,6 @@ class language extends common
}
/**
* Edition des paramètres de la langue de contenu
*/
public function locale()
{
// Action interdite ou URl avec le code langue incorrecte
$lang = $this->getUrl(2);
if (
array_key_exists($lang, self::$languages) === false
) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'language',
'state' => false,
'notification' => helper::translate('Action interdite')
]);
}
// Soumission du formulaire
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost()
) {
// Sauvegarder les locales
$data = [
'config' => [
'homePageId' => $this->getInput('localeHomePageId', helper::FILTER_ID, true),
'page404' => $this->getInput('localePage404'),
'page403' => $this->getInput('localePage403'),
'page302' => $this->getInput('localePage302'),
'legalPageId' => $this->getInput('localeLegalPageId'),
'searchPageId' => $this->getInput('localeSearchPageId'),
'poweredPageLabel' => empty($this->getInput('localePoweredPageLabel', helper::FILTER_STRING_SHORT)) ? 'Motorisé par' : $this->getInput('localePoweredPageLabel', helper::FILTER_STRING_SHORT),
'searchPageLabel' => empty($this->getInput('localeSearchPageLabel', helper::FILTER_STRING_SHORT)) ? 'Rechercher' : $this->getInput('localeSearchPageLabel', helper::FILTER_STRING_SHORT),
'legalPageLabel' => empty($this->getInput('localeLegalPageLabel', helper::FILTER_STRING_SHORT)) ? 'Mentions légales' : $this->getInput('localeLegalPageLabel', helper::FILTER_STRING_SHORT),
'sitemapPageLabel' => empty($this->getInput('localeSitemapPageLabel', helper::FILTER_STRING_SHORT)) ? 'Plan du site' : $this->getInput('localeSitemapPageLabel', helper::FILTER_STRING_SHORT),
'metaDescription' => $this->getInput('localeMetaDescription', helper::FILTER_STRING_LONG, true),
'title' => $this->getInput('localeTitle', helper::FILTER_STRING_SHORT, true),
'cookies' => [
// Les champs sont obligatoires si l'option consentement des cookies est active
'mainLabel' => $this->getInput('localeCookiesZwiiText', helper::FILTER_STRING_LONG, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)),
'titleLabel' => $this->getInput('localeCookiesTitleText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)),
'linkLegalLabel' => $this->getInput('localeCookiesLinkMlText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)),
'cookiesFooterText' => $this->getInput('localeCookiesFooterText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN)),
'buttonValidLabel' => $this->getInput('localeCookiesButtonText', helper::FILTER_STRING_SHORT, $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN))
]
]
];
// Sauvegarde hors méthodes si la langue n'est pas celle de l'UI
if ($lang === self::$i18nContent) {
// Enregistrer les données par lecture directe du formulaire
$this->setData(['config', $data['config']]);
} else {
// Sauver sur le disque
file_put_contents(self::DATA_DIR . $lang . '/locale.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT), LOCK_EX);
}
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => helper::translate('Modifications enregistrées'),
'state' => true
]);
}
// Préparation de l'affichage du formulaire
//-----------------------------------------
// La locale est-elle celle de la langue de l'UI ?
if ($lang === self::$i18nContent) {
self::$locales[$lang]['config'] = $this->getData(['config']);
} else {
// Lire les locales sans passer par les méthodes
self::$locales[$lang] = json_decode(file_get_contents(self::DATA_DIR . $lang . '/locale.json'), true);
}
// Générer la liste des pages disponibles
self::$pagesList = $this->getData(['page']);
foreach (self::$pagesList as $page => $pageId) {
if (
$this->getData(['page', $page, 'block']) === 'bar' ||
$this->getData(['page', $page, 'disable']) === true
) {
unset(self::$pagesList[$page]);
}
}
self::$orphansList = $this->getData(['page']);
foreach (self::$orphansList as $page => $pageId) {
if (
$this->getData(['page', $page, 'block']) === 'bar' ||
$this->getData(['page', $page, 'disable']) === true ||
$this->getdata(['page', $page, 'position']) !== 0
) {
unset(self::$orphansList[$page]);
}
}
// Valeurs en sortie
$this->addOutput([
'title' => helper::translate('Paramètres de la localisation') . '&nbsp;' . template::flag($lang, '20 %'),
'view' => 'config'
]);
}
/**
* Edition de la langue de l'interface
*/

View File

@ -12,77 +12,17 @@
*/
$(document).ready(function() {
var translateLayout = getCookie("translateLayout");
if (translateLayout == null) {
translateLayout = "content";
setCookie("translateLayout", "content");
$(document).ready(function () {
}
$("#contentContainer").hide();
$("#uiContainer").hide();
$("#" + translateLayout + "Container").show();
$("#translate" + capitalizeFirstLetter(translateLayout) + "Button").addClass("activeButton");
});
// Sélecteur de fonctions
$("#translateUiButton").on("click", function() {
$("#contentContainer").hide();
$("#uiContainer").show();
$(this).addClass("activeButton");
$("#translateContentButton").removeClass("activeButton");
setCookie("translateLayout", "ui");
});
$("#translateContentButton").on("click", function() {
$("#uiContainer").hide();
$("#contentContainer").show();
$(this).addClass("activeButton");
$("#translateUiButton").removeClass("activeButton");
setCookie("translateLayout", "content");
// Afficher les boutons liés au contenu
$(".contentButtonContainer").show();
});
/**
/**
* Confirmation de suppression
*/
$(".translateDelete").on("click", function() {
$(".translateDelete").on("click", function () {
var _this = $(this);
var message_delete = "<?php echo helper::translate('Confirmer la suppression de cette langue'); ?>";
return core.confirm(message_delete, function() {
return core.confirm(message_delete, function () {
$(location).attr("href", _this.attr("href"));
});
});
});
// Fonctions
function setCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/; samesite=lax";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
// Define function to capitalize the first letter of a string
function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}

View File

@ -17,20 +17,7 @@
]);*/?>
</div>
</div>
<div class="tab">
<?php echo template::button('translateUiButton', [
'value' => 'Interface',
'class' => 'buttonTab'
]); ?>
<?php echo template::button('translateContentButton', [
'value' => 'Site',
'class' => 'buttonTab'
]); ?>
</div>
<div id="uiContainer" class="tabContent">
<div class="row">
<div class="row">
<div class="col12">
<div class="block">
<h4>
@ -41,8 +28,8 @@
<?php endif; ?>
</div>
</div>
</div>
<div class="row">
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
@ -53,46 +40,7 @@
<?php endif; ?>
</div>
</div>
</div>
</div>
<div id="contentContainer" class="tabContent">
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Paramètres'); ?>
</h4>
<div class="col4 offset2">
<?php echo template::button('translateButtonCopyContent', [
'href' => helper::baseUrl() . 'language/copy',
'ico' => 'docs',
'disabled' => $module::$siteCopy,
'value' => 'Copie de contenus localisés'
]); ?>
</div>
<div class="col4">
<?php echo template::button('translateButtonAddContent', [
'href' => helper::baseUrl() . 'language/add',
'ico' => 'plus',
'class' => 'buttonGreen',
'value' => 'Nouveau contenu localisé'
]); ?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Langues installées'); ?>
</h4>
<?php if ($module::$languagesInstalled): ?>
<?php echo template::table([2, 6, 1, 1], $module::$languagesInstalled, ['Langues', '', '', '']); ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -41,7 +41,7 @@ class maintenance extends common
? ''
: $this->getData(['page', $this->getData(['config', 'page302']), 'title']),
//'content' => $this->getdata(['page',$this->getData(['config','page302']),'content']),
'content' => $this->getPage($this->getData(['config', 'page302']), self::$i18nContent),
'content' => $this->getPage($this->getData(['config', 'page302']), self::$classesContent),
'view' => 'index'
]);
} else {

View File

@ -174,11 +174,11 @@ class page extends common
]
]);
// Creation du contenu de la page
if (!is_dir(self::DATA_DIR . self::$i18nContent . '/content')) {
mkdir(self::DATA_DIR . self::$i18nContent . '/content', 0755);
if (!is_dir(self::DATA_DIR . self::$classesContent . '/content')) {
mkdir(self::DATA_DIR . self::$classesContent . '/content', 0755);
}
//file_put_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $pageId . '.html', '<p>Contenu de votre nouvelle page.</p>');
$this->setPage($pageId, '<p>Contenu de votre nouvelle page.</p>', self::$i18nContent);
//file_put_contents(self::DATA_DIR . self::$classesContent . '/content/' . $pageId . '.html', '<p>Contenu de votre nouvelle page.</p>');
$this->setPage($pageId, '<p>Contenu de votre nouvelle page.</p>', self::$classesContent);
// Met à jour le sitemap
$this->updateSitemap();
@ -279,8 +279,8 @@ class page extends common
}
// Effacer la page
$this->deleteData(['page', $page]);
if (file_exists(self::DATA_DIR . self::$i18nContent . '/content/' . $page . '.html')) {
unlink(self::DATA_DIR . self::$i18nContent . '/content/' . $page . '.html');
if (file_exists(self::DATA_DIR . self::$classesContent . '/content/' . $page . '.html')) {
unlink(self::DATA_DIR . self::$classesContent . '/content/' . $page . '.html');
}
$this->deleteData(['module', $page]);
@ -369,8 +369,8 @@ class page extends common
// Supprime l'ancienne page si l'id a changée
if ($pageId !== $this->getUrl(2)) {
$this->deleteData(['page', $this->getUrl(2)]);
if (file_exists(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getUrl(2) . '.html')) {
unlink(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getUrl(2) . '.html');
if (file_exists(self::DATA_DIR . self::$classesContent . '/content/' . $this->getUrl(2) . '.html')) {
unlink(self::DATA_DIR . self::$classesContent . '/content/' . $this->getUrl(2) . '.html');
}
}
// Traitement des pages spéciales affectées dans la config :
@ -508,11 +508,11 @@ class page extends common
]);
// Creation du contenu de la page
if (!is_dir(self::DATA_DIR . self::$i18nContent . '/content')) {
mkdir(self::DATA_DIR . self::$i18nContent . '/content', 0755);
if (!is_dir(self::DATA_DIR . self::$classesContent . '/content')) {
mkdir(self::DATA_DIR . self::$classesContent . '/content', 0755);
}
$content = empty($this->getInput('pageEditContent', null)) ? '<p></p>' : str_replace('<p></p>', '<p>&nbsp;</p>', $this->getInput('pageEditContent', null));
$this->setPage($pageId, $content, self::$i18nContent);
$this->setPage($pageId, $content, self::$classesContent);
// Met à jour le sitemap
$this->updateSitemap();

View File

@ -108,7 +108,7 @@
<div class="col12">
<?php echo template::textarea('pageEditContent', [
'class' => 'editorWysiwyg',
'value' => $this->getPage($this->getUrl(2), self::$i18nContent)
'value' => $this->getPage($this->getUrl(2), self::$classesContent)
]); ?>
</div>
</div>

View File

@ -537,19 +537,19 @@ class plugin extends common
$infoModules[$pagesInfos[$keyi18n][$keyPage]['moduleId']]['version'],
template::flag($keyi18n, '20px') . '&nbsp<a href ="' . helper::baseUrl() . $keyPage . '" target="_blank">' . $pagesInfos[$keyi18n][$keyPage]['title'] . ' (' . $keyPage . ')</a>',
template::button('dataExport' . $keyPage, [
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$classesContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
// appel de fonction vaut exécution, utiliser un paramètre
'value' => template::ico('download-cloud'),
'help' => 'Sauvegarder les données du module dans le gestionnaire de fichiers'
]),
template::button('dataExport' . $keyPage, [
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$classesContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
// appel de fonction vaut exécution, utiliser un paramètre
'value' => template::ico('download'),
'help' => 'Sauvegarder et télécharger les données du module'
]),
template::button('dataDelete' . $keyPage, [
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$classesContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
// appel de fonction vaut exécution, utiliser un paramètre
'value' => template::ico('trash'),
'class' => 'buttonRed dataDelete',

View File

@ -213,8 +213,8 @@ class search extends common
) {
$url = $parentId;
$titre = $this->getData(['page', $parentId, 'title']);
//$content = file_get_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getData(['page', $parentId, 'content']));
$content = $this->getPage($parentId, self::$i18nContent);
//$content = file_get_contents(self::DATA_DIR . self::$classesContent . '/content/' . $this->getData(['page', $parentId, 'content']));
$content = $this->getPage($parentId, self::$classesContent);
$content = $titre . ' ' . $content;
// Pages sauf pages filles et articles de blog
$tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier);
@ -232,8 +232,8 @@ class search extends common
) {
$url = $childId;
$titre = $this->getData(['page', $childId, 'title']);
//$content = file_get_contents(self::DATA_DIR . self::$i18nContent . '/content/' . $this->getData(['page', $childId, 'content']));
$content = $this->getPage($childId, self::$i18nContent);
//$content = file_get_contents(self::DATA_DIR . self::$classesContent . '/content/' . $this->getData(['page', $childId, 'content']));
$content = $this->getPage($childId, self::$classesContent);
$content = $titre . ' ' . $content;
//Pages filles
$tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier);