Smarty for WordPress permits your Smarty template file to be embedded in a WordPress post/page.
Do you have Smarty templates that you would like to use in your wordpress blog?
Do you want a fast track migration from Smarty to WordPress?
Smarty for WordPress is the first plugin which incorporates a complete distribution of the Smarty template engine as a WordPress plug-in. You embed your Smarty template file by using a WordPress short code with the Smarty template file name and any variable which you want to be passed to your Smarty template file.
There are many useful frameworks written in Smarty and NOT WordPress, like XCart, that can NOW be implemented into WordPress with minimal changes and ease?
Stop! Don't throw away that Smarty Template file, Download Smarty for WordPress, install, activate and use that Smarty template file in WordPress TODAY!!!
Usage
First you need to create your Smarty directories under the theme path that you will be using, e.g.
themes/theme_name/templates
themes/theme_name/templates_c
themes/theme_name/cache
themes/theme_name/config
themes/theme_name/plugins
themes/theme_name/trusted
You may use Smarty for WordPress either in you PHP/Theme files or from your WordPress posts and pages. To use the API, simple invoke the function that returns the page information requested. There are three API's for this purpose:
If you wish to use Smarty in your custom worpress php files, then
You can also invoke the API's from your WordPress pages/posts through short codes.
Create a WordPress page and enter the following short code:
[smarty-display tpl=home.tpl]
where home.tpl is your smarty template located in the templates path
If you want to pass a single variable with the template, use
[smarty-display tpl=home.tpl name=myVariable value="some value"]
where name is the variable name specified in you smarty template file, and
value is the value to be passed to your smarty template file that the above
variable represents
if you want to pass multiple variables to the smarty template, use
[smarty-load-multiple tpl=home.tpl name='my1,my2,my3' value='1,2,test']
where name holds a comma delimited list of smarty template variable names while
value holds a comma delimited list of associated values for the variable names.
The admin page under Settings permits setting the following Smarty attributes: - Auto literal - Cache lifetime - Cache modified check - Config booleanized - Config overwrite - Config read hidden - Debugging - Force compile - PHP handling - Use sub0directories
Testing Smarty for WordPress can be accomplished by creating a post with the following shortcode, [smarty-test]
Requires: 2.8.6 or higher
Compatible up to: 3.0.5
Last Updated: 2011-4-9
Downloads: 1,157




