ECMS Templates
From NewHaven Software Wiki
Malcolm lee (Talk | contribs) (Created page with 'eCMS uses the [http://www.smarty.net/ Smarty] template system. Smarty is [http://www.php.net PHP] based and is currently the most popular templating system of it's kind. From th…') |
|||
(5 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | eCMS uses the [http://www.smarty.net/ Smarty] template system. Smarty is [http://www.php.net PHP] based and is currently the most popular templating system of it's kind. | + | ==What is a template?== |
+ | |||
+ | eCMS uses the [http://www.smarty.net/ Smarty] template system. Smarty is [http://www.php.net PHP] based and is currently the most popular templating system of it's kind. Template allow you to easily control the presentation (visual) layer of your site without the need understand the application (logic) layer. | ||
From the Smarty [http://smarty.incutio.com/?page=SmartyFrequentlyAskedQuestions#basics-1 FAQ Page:] | From the Smarty [http://smarty.incutio.com/?page=SmartyFrequentlyAskedQuestions#basics-1 FAQ Page:] | ||
- | Q: What's a template engine and why should I use one? | + | '''Q: What's a template engine and why should I use one?''' |
+ | |||
A: (copied from Smarty manual) | A: (copied from Smarty manual) | ||
- | 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. | + | 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.[http://smarty.incutio.com/?page=SmartyFrequentlyAskedQuestions#basics-1] |
+ | |||
+ | ==Additional Resources== | ||
+ | |||
+ | * [http://www.smarty.net Smarty.net] - The main site for the Smarty product. Here you can find a vast amount of documentation. | ||
+ | * [http://smarty.incutio.com/?page=SmartyFrequentlyAskedQuestions Smarty Frequently Asked Questions (FAQ)] - A list of commonly asked questions related to Smarty. | ||
+ | * [http://www.smarty.net/manual/en/smarty.for.designers.php Smarty Documentation (for Designers] - All site have this level of access to the Smarty template system. | ||
+ | * [http://www.smarty.net/docs.php All Smarty.net docs] - This includes printable versions of Smarty documentation. | ||
+ | * [http://www.smarty.net/forums/ Smarty Forums] - Come here to ask questions or if want to see how others may have come up with a solution. | ||
+ | * [http://www.smarty.net/resources.php Smarty Mailing Lists] - Great way to learn more about how people are using Smarty. There is also a searchable archive |
Current revision as of 15:40, 17 July 2014
What is a template?
eCMS uses the Smarty template system. Smarty is PHP based and is currently the most popular templating system of it's kind. Template allow you to easily control the presentation (visual) layer of your site without the need understand the application (logic) layer.
From the Smarty FAQ Page:
Q: What's a template engine and why should I use one?
A: (copied from Smarty manual)
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.[1]
Additional Resources
- Smarty.net - The main site for the Smarty product. Here you can find a vast amount of documentation.
- Smarty Frequently Asked Questions (FAQ) - A list of commonly asked questions related to Smarty.
- Smarty Documentation (for Designers - All site have this level of access to the Smarty template system.
- All Smarty.net docs - This includes printable versions of Smarty documentation.
- Smarty Forums - Come here to ask questions or if want to see how others may have come up with a solution.
- Smarty Mailing Lists - Great way to learn more about how people are using Smarty. There is also a searchable archive