Contact Sales  |  1-888-227-5040   |   Contact Support     
Login   |   Our Blog   |   Newsletter

Subscribe By Email

Receive email alerts when new blog posts are available!

Subscribe by RSS

Subscribe to our blog

Follow Us

Follow us on Twitter

The Topics


Recent Comments

    Thomas J. Rundquist: We use theses scales in out Racial Attitude Survey and Cultural Diversity Test. RAS was reviewed by Mental Measurements Yearbook and the basic concept is in ENTREPRENEUR...
    Mike: I consider re-writing software (a.k.a. refactoring) as the equivalent of simplifying equations in mathematics. IMHO, those who don’t habitually refactor will never produce great...
    Anonymous: While the title of this post is “The 4 P’s of Marketing You Should Ignore”, I only see one of the P’s addressed: promotion. And while it is certainly true that...
    Alexander TheBackpackr.com: Just trying to help :)
    Alexander TheBackpackr.com: Hi there, its a fairly interesting article on type… however, I don’t recall having a Veranda font installed. :) Perhaps you might be making reference to...
    Landing Page Templates: Thanks for the template. Its lovely.
    Alex: That makes no sense….. lets say that I’m running site where VB is my community forum and Support Trio is my Support system… based on what you just wrote, my clients need to...
    Alex: I’m lost a little… can existing Support Trio users login to vBulletin …..is it more like login share? both ways?

Explore the blog


Our Blog Archive

Our Products

1-2-All iSalient KnowledgeBuilder SupportTrio TrioLive SwiftTraction visualEdit

Using Smarty Templates in KnowledgeBuilder

Chris / Aug 04

With the lastest version of [KnowledgeBuilder][1] came a huge change in how much flexibility the system gives you to tailor KB to your site’s look and feel. It used to be that the “public” section of KB was a collection of half HTML half PHP pages that were difficult to understand and edit. About the only thing you could do easily was specify a header and footer and change some colors via the master CSS file. Knowledge Builder 2.5x now uses the Smarty Template Engine to allow you to completely customize how your KB site looks and how the information is presented.
[1]: http://www.activecampaign.com/kb “KnowledgeBuilder”

## Smarty Template Background ##
The Smarty Template Engine ([Smarty][2]) is more of a “presentation framework”, allowing PHP programmers to separate their application’s business logic from the visual display. Smarty accomplishes this by using a light markup language that can be embedded in your HTML to display dynamic data that is generated by the business logic side of your application.

## How we use it ##
A lot of work went into completely separating the logic that manages Categories and Articles in KB from the actual presentation of Categories and Articles. This basically splits KB into two parts: one part that evaluates the current context (viewing an article, viewing a category, making a comment, subscribing to an article, etc) and fetches the correct data for that context, and one part that displays that raw information. The second part is what is now completely customizable by you.

When any given page loads in the public section of [KnowledgeBuilder][1] (non-admin section that is), the last step in the process is to render the template for that page. Templates for KB live in the `templates` directory, in subdirectories for each *template set*. KB is shipped with three templates: *Default*, *Directory*, and *Simple*. If you are upgrading KB please note that the old KB template directories will not be deleted, but you can tell which ones are the old ones because their directory names start with lowercase letters (if you no longer need these, it’s safe to delete them).

> *Choosing a template:*
> You can choose which template set you want to use in the Admin section under Settings.

*Continue to the next page to learn about how KB’s templating system is structured…*

[1]: http://www.activecampaign.com/kb “KnowledgeBuilder”
[2]: http://smarty.php.net “Smarty”

Pages: 1 2 3 4

4 Comments

Tim at 2005-08-04 12:34:04

Very nice write up. The {Debug} is great tool - I wish I had known about this earlier.

tb

 
Chris at 2005-08-04 12:42:25

Yeah, {debug} is your best friend when working on a Smarty based site.

 

Make Your Own Web Site » Make Your Own Web Site…

As a final bid for bringing together community through the library a calendaring system could be implemented which gives all recognized community organizations an opportunity to plug into a central calendar system, hosted by the library; providing a li…

 
Create My Business Plan at 2008-10-30 03:21:46

Smarty Template Engine is really work smartly….i am appreciating it from core.Thanks!!

 
Name
E-mail (Never Shown Publicly)
URL (Optional)
Your Comment (smaller size | larger size)



Print  |  Bookmark
© 2009 ActiveCampaign,Inc. All rights reserved.