[Cartoweb-users] Troubles using Smarty
marc.monnerat at swisstopo.ch
marc.monnerat at swisstopo.ch
Fri Jan 13 09:26:32 EST 2006
Hello,
You don't need to install Smarty, it's already included in Cartoweb3 (or at
least it's downloaded when you run the cw3setup.php script)
Cartoweb3 template have 2 additional tags:
{t} for translation and
{r} for ressources (images,etc.)
See § 16.3. "Resources" on
http://www.cartoweb.org/doc/cw3.1/xhtml/user.template.html
These are not recognized by standard Smarty and it won't compile.
Marc Monnerat
-----Message d'origine-----
De : cartoweb-users-bounces at lists.maptools.org
[mailto:cartoweb-users-bounces at lists.maptools.org] De la part de Valerio
Noti
Envoyé : vendredi, 13. janvier 2006 15:08
À : cartoweb-users at lists.maptools.org
Objet : [Cartoweb-users] Troubles using Smarty
Hi,
I'm trying to modify layout of CW3Demo project. I never used Smarty and I
have problems using (configuring?) it..
These are the steps I followed:
1) Downloaded Smarty 2.6.11.
2) Followed instructions for Windows installation
(http://news.php.net/php.smarty.dev/2703 )
3) Tested the sample code of that page. It works.
4) Modified (just changed a static string) in
C:/wamp/www/cartoweb3/projects/demoCW3/templates/cartoclient.tpl (is this a
right file?)
5) Created index.php with the following code:
<?php
// load Smarty library
require('Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = 'C:/wamp/www/cartoweb3/projects/demoCW3/templates';
$smarty->config_dir = 'C:\wamp\www\smarty\configs'; $smarty->cache_dir =
'C:\wamp\smarty\cache'; $smarty->compile_dir =
'C:\wamp\www\cartoweb3\templates_c';
//$smarty->assign('name','fish boy!'); $smarty->display('cartoclient.tpl');
?>
6) When I execute index.php the error it gives me is:
Fatal error: Smarty error: [in cartoclient.tpl line 7]: syntax error:
unrecognized tag 'r' (Smarty_Compiler.class.php, line 580) in
c:\wamp\smarty\libs\Smarty.class.php on line 1095
If I understood how this tool works, when I execute this index.php file,
Smarty trasforms tpl in php file e saves it in
C:\wamp\www\cartoweb3\templates_c (compile_dir).
So the Cartoweb demo would be updated. Is this correct?
Any help appreciated
thanks
Valerio Noti
_______________________________________________
Cartoweb-users mailing list
Cartoweb-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users
More information about the Cartoweb-users
mailing list