Line 64:
Line 64:
== Accéder aux propriétés de la page web ==
== Accéder aux propriétés de la page web ==
−
C'est un autre exemple de contenu dynamique permettant d'obtenir des métadonnées d'un conteneur/page :
+
Voici un autre exemple de contenu dynamique permettant d'obtenir des métadonnées d'un conteneur/page :
<source lang="html">
<source lang="html">
−
__(Title)__ : <?php echo $websitepage->title; ?><br>
+
__(Titre)__ : <?php echo $websitepage->title; ?><br>
__(Description)__ : <?php echo $websitepage->description; ?><br>
__(Description)__ : <?php echo $websitepage->description; ?><br>
−
__(Keywords)__ : <?php echo $websitepage->keywords; ?><br>
+
__(Mots-clés)__ : <?php echo $websitepage->keywords; ?><br>
−
__(DateCreation)__ : <?php echo dol_print_date($websitepage->date_creation, 'dayhour', $weblangs); ?><br>
+
__(DateDeCréation)__ : <?php echo dol_print_date($websitepage->date_creation, 'dayhour', $weblangs); ?><br>
</source>
</source>
−
== Latest Blog post ==
+
== Dernier article du blog ==
−
This is an example of a section to show the list of latest 5 active articles (container with type "blogpost"), in english, that contains the keyword "mykeyword".
+
Voici un exemple de page qui affiche la liste des 5 derniers articles actifs (conteneur de type "blogpost"), en français, qui contient le mot-clé "monmotclé".
<source lang="html">
<source lang="html">
<!-- Blog list -->
<!-- Blog list -->
<section id="sectionnews" contenteditable="true" class="main section-50 section-md-50 section-md-bottom-50">
<section id="sectionnews" contenteditable="true" class="main section-50 section-md-50 section-md-bottom-50">
−
<h2>Latest Blog posts</h2>
+
<h2>Derniers articles du blog</h2>
<div class="center">
<div class="center">
<?php
<?php
−
$keyword = 'mykeyword';
+
$keyword = 'monmotclé';
$weblangs->loadLangs(array("main"));
$weblangs->loadLangs(array("main"));
−
$arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', 5, 0, array('type_container'=>'blogpost', 'keywords'=>$keyword, 'status'=>'1', 'lang'=>'en'));
+
$arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', 5, 0, array('type_container'=>'blogpost', 'keywords'=>$keyword, 'status'=>'1', 'lang'=>'fr'));
if (is_numeric($arrayofblogs) && $arrayofblogs < 0)
if (is_numeric($arrayofblogs) && $arrayofblogs < 0)
{
{
Line 127:
Line 127:
</source>
</source>
−
== Read another remote Dolibarr database ==
+
== Lire une autre base de données Dolibarr distante ==
−
Just create a remote database connection and then, use this one for your SQL requests
+
Il suffit de créer une connexion à la base de données à distance et d'utiliser celle-ci pour vos requêtes SQL
<source lang="html">
<source lang="html">
Line 137:
Line 137:
</source>
</source>
−
Note: You can also decide to use the APIs.
+
Remarque : vous pouvez également opter pour l'utilisation des API.
−
= Create a custom 404 page =
+
= Créer une page 404 personnalisée =
−
To create a custom 404 page, just create a common empty page with the name "404" and the type "page". Then edit the HTML content of the page with the content of your choice, and add at the end the page
+
Pour créer une page 404 personnalisée, il suffit de créer une page vide standard avec le nom "404" et le type "page". Ensuite, modifiez le contenu HTML de la page avec le contenu de votre choix, et ajoutez à la fin de la page
<source lang="html">
<source lang="html">
Line 146:
Line 146:
</source>
</source>
−
Then you must edit your web server setup to tell to use this page as the 404 page. For example with Apache, add into your virtual host configuration:
+
Ensuite, vous devez modifier la configuration de votre serveur web pour indiquer d'utiliser cette page comme la page 404. Par exemple, avec Apache, ajoutez dans la configuration de votre hôte virtuel :
<source lang="ini">
<source lang="ini">
ErrorDocument 404 /404.php
ErrorDocument 404 /404.php