mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
update FAQ
This commit is contained in:
21
FAQ
21
FAQ
@@ -1,6 +1,8 @@
|
|||||||
QUESTION INDEX
|
QUESTION INDEX
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
GENERAL
|
||||||
|
|
||||||
Q: What is Smarty?
|
Q: What is Smarty?
|
||||||
Q: What's the difference between Smarty and other template engines?
|
Q: What's the difference between Smarty and other template engines?
|
||||||
Q: What do you mean "Compiled PHP Scripts" ?
|
Q: What do you mean "Compiled PHP Scripts" ?
|
||||||
@@ -13,6 +15,13 @@ Q: Do you have a mailing list?
|
|||||||
Q: Can you change the mailing list so reply-to sends to the list and not the
|
Q: Can you change the mailing list so reply-to sends to the list and not the
|
||||||
user?
|
user?
|
||||||
|
|
||||||
|
HOWTO
|
||||||
|
|
||||||
|
Q: How do I generate different cache files per template based on arguments
|
||||||
|
passed to the page?
|
||||||
|
|
||||||
|
TROUBLESHOOTING
|
||||||
|
|
||||||
Q: Smarty doesn't work.
|
Q: Smarty doesn't work.
|
||||||
Q: I get the following error when running Smarty:
|
Q: I get the following error when running Smarty:
|
||||||
Warning: Wrong parameter count for preg_replace() in
|
Warning: Wrong parameter count for preg_replace() in
|
||||||
@@ -34,6 +43,8 @@ Q: My ISP did not setup the PEAR repository, nor will they set it up. How do I
|
|||||||
make Smarty run without it?
|
make Smarty run without it?
|
||||||
Q: Javascript is causing Smarty errors in my templates.
|
Q: Javascript is causing Smarty errors in my templates.
|
||||||
|
|
||||||
|
MISC
|
||||||
|
|
||||||
Q: Can I use Macromedia's Dreamweaver to edit my templates?
|
Q: Can I use Macromedia's Dreamweaver to edit my templates?
|
||||||
Q: Dreamweaver is urlencoding the template delimiters when they are in a SRC or
|
Q: Dreamweaver is urlencoding the template delimiters when they are in a SRC or
|
||||||
HREF link. How do I get around this?
|
HREF link. How do I get around this?
|
||||||
@@ -118,6 +129,12 @@ A: Yes we could, but no we won't. Use "Reply-All" in your e-mail client to send
|
|||||||
to the list. http://www.unicom.com/pw/reply-to-harmful.html
|
to the list. http://www.unicom.com/pw/reply-to-harmful.html
|
||||||
|
|
||||||
|
|
||||||
|
HOWTO
|
||||||
|
-----
|
||||||
|
Q: How do I generate different cache files per template based on arguments
|
||||||
|
passed to the page?
|
||||||
|
A: Pass $REQUEST_URI as the cache_id when you display() or fetch() a page.
|
||||||
|
|
||||||
TROUBLESHOOTING
|
TROUBLESHOOTING
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
@@ -188,8 +205,8 @@ A: The easiest thing to do is grab all of PEAR and install it locally for your
|
|||||||
Q: Javascript is causing Smarty errors in my templates.
|
Q: Javascript is causing Smarty errors in my templates.
|
||||||
A: Surround your javascript with {literal}{/literal} tags. See the docs.
|
A: Surround your javascript with {literal}{/literal} tags. See the docs.
|
||||||
|
|
||||||
DREAMWEAVER
|
MISC
|
||||||
-----------
|
----
|
||||||
|
|
||||||
Q: Can I use Macromedia's Dreamweaver to edit my templates?
|
Q: Can I use Macromedia's Dreamweaver to edit my templates?
|
||||||
A: Certainly. You might want to change your tag delimiters from {} to something
|
A: Certainly. You might want to change your tag delimiters from {} to something
|
||||||
|
14
README
14
README
@@ -33,11 +33,15 @@ DESCRIPTION:
|
|||||||
|
|
||||||
What is Smarty?
|
What is Smarty?
|
||||||
|
|
||||||
Smarty is a template engine for PHP. One of the unique aspects about
|
Smarty is a template engine for PHP. Many other template engines for PHP
|
||||||
Smarty that sets it apart from other templating solutions is that it
|
provide basic variable substitution and dynamic block functionality. Smarty
|
||||||
converts the templates into native php scripts upon the first
|
takes a step further to be a "smart" template engine, adding features such
|
||||||
execution. After that, it just executes the compiled PHP scripts.
|
as configuration files, template functions, and variable modifiers, and
|
||||||
Therefore, there is no costly template file parsing for each request.
|
making all of this functionality as easy as possible to use for both
|
||||||
|
programmers and template designers. Smarty also converts the templates into
|
||||||
|
PHP scripts, eliminating the need to parse the templates on every
|
||||||
|
invocation. This makes Smarty extremely scalable and managable for large
|
||||||
|
application needs.
|
||||||
|
|
||||||
Some of Smarty's features:
|
Some of Smarty's features:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user