Remember me? forgot password | register

SilverStripe Forum

4682 Posts in 1048 Topics by 664 members

Jump to:

Extending and hacking

If this is your first visit, you will need to register before you can post. However, you can browse all messages below.

Community » SilverStripe Forum » Extending and hacking » Smarty Template Engine
Page: 1 go to end Reply
Author Topic: Smarty Template Engine 1003 views
  • Mat Weir
    Mat Weir's avatar
    Community Member
    6 posts

    Smarty Template Engine Link to this post

    Has anyone considered using Smarty as Silverstripe's template engine?

  • Sam
    avatar
    Core Development Team
    482 posts

    Re: Smarty Template Engine Link to this post

    We wanted a templating engine that was deliberately simpler to have a cleaner separation between the logic and presentation of a site. Other templating engine such as smarty puts too many smarts into the templating engine.

    I suppose it would be possible to do so on a site-by-site basis... You would need to replace the defaultAction() method of your Page_Controller to make the appropriate smarty calls.

    The other thing that you would need to do is get smarty to make the appropriate calls to the ViewableData methods obj() and XML_val().

    What did you see as being the advantage of using smarty?

  • carnal
    carnal's avatar
    Community Member
    17 posts

    Re: Smarty Template Engine Link to this post

    Hi Sam,

    sorry for this, but at the moment it would help you, because Smarty has a great documentation ;-)

    Regards

    Hartmut

  • Sam
    avatar
    Core Development Team
    482 posts

    Re: Smarty Template Engine Link to this post

    Documentation for the templating engine is here: http://doc.silverstripe.com/doku.php?id=templates

    It may seem short but there's not that much to the templating language.

    The bulk of the complexity is all the methods that are called on the controller / data object classes. The API documentation is helpful there: http://doc.silverstripe.com/assets/classes/

    1003 views
go to top Reply

Currently Online:

Invader_Zim, JR

Welcome to our latest member: Boomer T