1. dans modules/theme/setup, créer un nouveau fichier html5.xml sur la base de init.xml
2. contenu du fichier (pour l’ajout d’un doctype HTML5) :
1 2 3 4 5 6 7 8 9 10 11 |
<?xml version="1.0" encoding="UTF-8"?> <script> <binding fileName="modules/list/persistentdocument/import/list_binding.xml" /> <binding fileName="modules/theme/persistentdocument/import/theme_binding.xml" /> <systemfolder module="list" relatedmodule="theme"> <staticlist byListid="modules_theme/doctype" label="Doctype des pages"> <staticitem label="HTML 5" value="HTML-5"/> </staticlist> </systemfolder> </script> |
3. ajouter ceci dans modules/theme/persistentdocument/pagetemplate.class.php :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
/** * @return string */ public function getDocTypeDeclaration() { if ($this->getDoctype() == 'HTML-5') { return '<!DOCTYPE html>'; } elseif ($this->getDoctype() == 'XHMTL-1.0-Transitional') { return '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'; } return '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; } |
4. puis sous Putty :
1 |
$ change.php (ou autre alias de la commande change) import-data theme html5.xml |