SmartFAQ is developed by The SmartFactory (http://www.smartfactory.ca), a division of InBox Solutions (http://www.inboxsolutions.net)

What is Smarty?
  Requested and Answered by Carnuke on 2004/10/30 13:28:15     10874  reads 
Smarty is a template engine for PHP. More specifically, it facilitates a managable way to separate application logic and content from its presentation. This is best described in a situation where the application programmer and the template designer play different roles, or in most cases are not the same person. For example, let's say you are creating a web page that is displaying a newspaper article. The article headline, tagline, author and body are content elements, they contain no information about how they will be presented. They are passed into Smarty by the application, then the template designer edits the templates and uses a combination of HTML tags and template tags to format the presentation of these elements (HTML tables, background colors, font sizes, style sheets, etc.) One day the programmer needs to change the way the article content is retrieved (a change in application logic.) This change does not affect the template designer, the content will still arrive in the template exactly the same. Likewise, if the template designer wants to completely redesign the templates, this requires no changes to the application logic. Therefore, the programmer can make changes to the application logic without the need to restructure templates, and the template designer can make changes to templates without breaking application logic. XOOPS uses the Smarty Template Engine and XOOPS scripts have Smarty tags embedded in the code. Smarty tags are identified by the delimiters <{ and }>. If you see variables, conditionals or functions inside those delimiters, they are considered Smarty tags. Smarty tags speed up site loading because the content of these tags have already been processed and compiled. So instead of creating a script to call out the site url, the username or even the theme folder, a Smarty tag is used. The great thing about using Smarty tags inside the theme.html is that it allows better control of layout by having a Smarty tag represent a content instead of a php script. Smarty tags can be placed in between HTML tags to enable formatting. For more information go to the Smarty manual For more details about specific usage on Xoops applications See here


The comments are owned by the author. We aren't responsible for their content.


Login

Username:
Password:

Lost Password? Register now!

Who's Online

51 user(s) are online (1 user(s) are browsing XOOPS FAQ)


Members: 0


Guests: 51


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Did you know ?

most shared servers are unsafe and enable malicious users to take advantage of world writable folders?

Random question

If I set up an articles module and have this only available for 'webmasters' to access, set via the admin panel and say one other group called 'elite' for instance. Would the contents that are included in this module be accessible and spidered by the search engines as normal?