Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Search found 25 matches
Smarty Forum Index
Author Message
  Topic: array looping with single element
muralik

Replies: 6
Views: 16196

PostForum: Smarty Development   Posted: Fri Nov 05, 2004 7:59 am   Subject: foreach for arrays
my foreach is like this




{if $item.SimilarProducts.SimilarProduct}
<tr><td colspan="2">
<h3>Similar - People who bought this also bought bel ...
  Topic: array looping with single element
muralik

Replies: 6
Views: 16196

PostForum: Smarty Development   Posted: Fri Nov 05, 2004 6:38 am   Subject: solution
dont know if this is proper solution, but fixed like this

wrote a plugin




function smarty_function_is_assoc_array($params, &$portal)
{
$result = $params['assign'];
...
  Topic: array looping with single element
muralik

Replies: 6
Views: 16196

PostForum: Smarty Development   Posted: Fri Nov 05, 2004 4:34 am   Subject: still issues
for that reason, i actually did something,
I am counting the array first, and then trying to do it accordingly.

here is my code but still not working



{assign var="similar" v ...
  Topic: array looping with single element
muralik

Replies: 6
Views: 16196

PostForum: Smarty Development   Posted: Thu Nov 04, 2004 8:49 am   Subject: array looping with single element
i have a problem looping with array when there is single element






i am using smarty code like this

{assign var="reviews" value=$item.CustomerReviews.Review}
...
  Topic: deleting cacheid groups
muralik

Replies: 5
Views: 5577

PostForum: General   Posted: Wed Oct 27, 2004 3:33 pm   Subject: thx
thx boots, i didnt see your reply,

i have a question though..

why do we need a trailing "|" ?
  Topic: deleting cacheid groups
muralik

Replies: 5
Views: 5577

PostForum: General   Posted: Wed Oct 27, 2004 3:15 pm   Subject: fixed
actually fixed now

i modified like this
$my_cache_id = "12|1";
$smarty->display("abc.tpl", $my_cache_id);

to clear cache
$smarty->clear_cache("null", "12");
  Topic: deleting cacheid groups
muralik

Replies: 5
Views: 5577

PostForum: General   Posted: Wed Oct 27, 2004 3:05 pm   Subject: deleting cacheid groups
Not sure how cache id groups works

i have cache ids like this
12-1, 12-2, 12-3

now i want to delete all cache which starts with 12

so i did like this

$my_cache_id ="12-1|";
$smarty-> ...
  Topic: does smarty clear cache delete files?
muralik

Replies: 6
Views: 7218

PostForum: General   Posted: Tue Oct 26, 2004 3:44 am   Subject: thanks
Hi thanks,

cache_dir is using relative path.. -> "site/default"

now i changed to absolute path -> "/www/virthosts/site/default"

and now it worked..
  Topic: does smarty clear cache delete files?
muralik

Replies: 6
Views: 7218

PostForum: General   Posted: Tue Oct 26, 2004 2:48 am   Subject: seutp problem
Hi,
what setup problem could be there ?

i am using windows.. and i have read write permission..
  Topic: does smarty clear cache delete files?
muralik

Replies: 6
Views: 7218

PostForum: General   Posted: Tue Oct 26, 2004 2:13 am   Subject: tried
Hi,
I also tried
$smarty->clear_all_cache();

but it doesnt delete files... and i am not using the site at all..
  Topic: does smarty clear cache delete files?
muralik

Replies: 6
Views: 7218

PostForum: General   Posted: Tue Oct 26, 2004 1:20 am   Subject: does smarty clear cache delete files?
Hi,
I am using

$smarty->clear_all_cache("product-list.tpl");

would this delete files ? or just make the cache expire.. because it is not deleting the files in the directory...
  Topic: Plugin code within database
muralik

Replies: 0
Views: 4494

PostForum: Plugins   Posted: Sun Oct 03, 2004 3:27 am   Subject: Plugin code within database
Hello,

I have a database which stores my data, and i display using smarty

by specifying like this in template


{$content}



in my database i am storing data like this



b ...
  Topic: error with insert
muralik

Replies: 1
Views: 4487

PostForum: Bugs   Posted: Fri Aug 20, 2004 4:39 pm   Subject: looks like working
it looks like working now, i dont get error:

i have changed amazon plugin like this

in the beginning of plugin

i added


// Temporarily save caching info
$caching = $portal->caching; ...
  Topic: error with insert
muralik

Replies: 1
Views: 4487

PostForum: Bugs   Posted: Fri Aug 20, 2004 4:27 pm   Subject: error with insert
hi, i am displaying banner using a insert plugin, i get this error




f8d698aea36fcbead2b9d5359ffca76f{insert_cache a:4:{s:4:"name";s:9:"getbanne ...
  Topic: variabled assigned in php not able to use in templates
muralik

Replies: 1
Views: 3627

PostForum: Bugs   Posted: Wed Jun 23, 2004 5:58 am   Subject: variabled assigned in php not able to use in templates
I have a PHP script like this
<?php
$smarty->assign('page_desc',stripslashes($page_desc));
$smarty->display("affiliates.tpl");
?>

and I have template
affiliates.tpl
as


...
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP