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

Search found 1635 matches
Smarty Forum Index
Author Message
  Topic: Can't find plugin in directory
AnrDaemon

Replies: 5
Views: 132

PostForum: Plugins   Posted: Mon Aug 03, 2020 8:57 am   Subject: Can't find plugin in directory
In documentation.
https://www.smarty.net/docs/en/language.syntax.functions.tpl
  Topic: Check class of a page
AnrDaemon

Replies: 3
Views: 65

PostForum: General   Posted: Sun Aug 02, 2020 11:48 pm   Subject: Check class of a page
Not a Smarty question.
Look for JavaScript solutions.
  Topic: String to Float not work
AnrDaemon

Replies: 1
Views: 64

PostForum: General   Posted: Sat Aug 01, 2020 12:09 pm   Subject: String to Float not work
Try this code:

{$test1=($value1 - $value2)}
{$test1|number_format:",":" "}
  Topic: Check class of a page
AnrDaemon

Replies: 3
Views: 65

PostForum: General   Posted: Sat Aug 01, 2020 12:05 pm   Subject: Check class of a page
Depends, what you mean by "particular class".
  Topic: Can't find plugin in directory
AnrDaemon

Replies: 5
Views: 132

PostForum: Plugins   Posted: Thu Jul 30, 2020 9:53 pm   Subject: Can't find plugin in directory
Your Smarty version is grossly outdated to begin with.
And to the point of your problem, double check the naming.

If you are still convinced everything is all right, try replicating you issue usin ...
  Topic: Delete some elements from specific pages.
AnrDaemon

Replies: 3
Views: 81

PostForum: General   Posted: Thu Jul 30, 2020 9:50 pm   Subject: Delete some elements from specific pages.
Then this is not a Smarty problem.
  Topic: Can't find plugin in directory
AnrDaemon

Replies: 5
Views: 132

PostForum: Plugins   Posted: Thu Jul 30, 2020 11:17 am   Subject: Can't find plugin in directory
{email_setup data=$mydata}

But you are doing it wrong. Don't use templates for your business logic.
  Topic: Delete some elements from specific pages.
AnrDaemon

Replies: 3
Views: 81

PostForum: General   Posted: Thu Jul 30, 2020 11:14 am   Subject: Delete some elements from specific pages.
Use different templates for different pages, see also template inheritance.

https://www.smarty.net/docs/en/language.function.extends.tpl
https://www.smarty.net/docs/en/language.function.include.tp ...
  Topic: Can't pass a variable...
AnrDaemon

Replies: 1
Views: 69

PostForum: General   Posted: Fri Jul 24, 2020 12:37 pm   Subject: Can't pass a variable...
Not a Smarty question. Fix your PHP code.
  Topic: A question
AnrDaemon

Replies: 1
Views: 214

PostForum: General   Posted: Fri Jul 17, 2020 2:51 pm   Subject: A question
Your question really not related to Smarty.
Write your page as it should work, then split it into templates.
For Smarty (and PHP to that extent) all your HTML/JS is merely a stream of bytes.
  Topic: Passing variables to child loaded with ajax content
AnrDaemon

Replies: 2
Views: 164

PostForum: General   Posted: Thu Jul 16, 2020 12:50 am   Subject: Passing variables to child loaded with ajax content
Correct. AJAX request happens when Smarty is long since dead, not to mention - it happens outside the server to begin with. Use client scripting to deal with data received from AJAX request.
  Topic: Session active but all session variable are gone on submit
AnrDaemon

Replies: 2
Views: 370

PostForum: General   Posted: Mon Jun 22, 2020 12:31 pm   Subject: Session active but all session variable are gone on submit
Check network traffic (from browser dev. tools). Is the session cookie correctly passed back and forth?
Any errors in the logs? Perhaps, your PHP is unable to write session state.

(Short answer: n ...
  Topic: Problems with the truncate modifier
AnrDaemon

Replies: 3
Views: 469

PostForum: General   Posted: Thu Jun 11, 2020 4:43 pm   Subject: Problems with the truncate modifier
The docs mention:
"{$controller|truncate:6}

Or {$controller|truncate:4:\u{2026}}
  Topic: Recommended tutorials for Smarty 3
AnrDaemon

Replies: 4
Views: 393

PostForum: General   Posted: Thu Jun 11, 2020 4:40 pm   Subject: Recommended tutorials for Smarty 3
You can use it anywhere. Modifier syntax is quite transparent.

Say, I often use {$var|print_r:1} (which is a direct equivalent to "print_r($var, 1)" ) for quick-and-dirty te ...
  Topic: Recommended tutorials for Smarty 3
AnrDaemon

Replies: 4
Views: 393

PostForum: General   Posted: Tue Jun 09, 2020 6:59 pm   Subject: Recommended tutorials for Smarty 3
Documentation for Smarty 3 is quite complete.
If you have any specific usage questions, just ask them.
 
Page 1 of 109 Goto page 1, 2, 3 ... 107, 108, 109  Next
All times are GMT
Jump to:  


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