diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 563fc950784..0a040449bf4 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -209,23 +209,23 @@ if ($resql) // Check if a custom template is present if (file_exists(DOL_DOCUMENT_ROOT . '/theme/'.$conf->theme.'/templates/product/'.$_GET["canvas"].'/liste.tpl')) { - $smarty->template_dir = DOL_DOCUMENT_ROOT . '/theme/'.$conf->theme.'/templates'; - $template = '/product/'.$_GET["canvas"].'/liste.tpl'; + $smarty->template_dir = DOL_DOCUMENT_ROOT . '/theme/'.$conf->theme.'/templates/product/'; + $template = $_GET["canvas"].'/liste.tpl'; } // Check if a default template is present else if (file_exists(DOL_DOCUMENT_ROOT . '/product/canvas/'.$_GET["canvas"].'/liste.tpl')) { - $smarty->template_dir = DOL_DOCUMENT_ROOT . '/product/canvas'; - $template = '/'.$_GET["canvas"].'/liste.tpl'; + $smarty->template_dir = DOL_DOCUMENT_ROOT . '/product/canvas/'; + $template = $_GET["canvas"].'/liste.tpl'; } // Error template else { - $smarty->template_dir = DOL_DOCUMENT_ROOT . '/theme/common/templates'; - $template = '/error.tpl'; + $smarty->template_dir = DOL_DOCUMENT_ROOT . '/theme/common/templates/'; + $template = 'error.tpl'; } - $smarty->display($smarty->template_dir.$template); + $smarty->display($template); } else { diff --git a/htdocs/theme/common/templates/error.tpl b/htdocs/theme/common/templates/error.tpl new file mode 100644 index 00000000000..3bce69570b9 --- /dev/null +++ b/htdocs/theme/common/templates/error.tpl @@ -0,0 +1,24 @@ +{* Copyright (C) 2009 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + *} + + + + + + \ No newline at end of file