Search code examples
phptemplatesweb-applicationskohanamustache

Mustache php gettext()



I am experimenting with kostache, "mustache for kohana framework".

Is there any way I can use simple PHP functions in mustache template files.
I know logic and therefore methods are against logic-less design principle, but I'm talking about very simple functionality.

For example:

  • gettext('some text') or __('some text')
  • get the base url; in kohana -> Url::site('controller/action')

Solution

  • Bobthecow is working on an experimental feature that will allow you to call a function as a callback.

    Check out the higher-order-sections branch of the repository and the ticket to go with it.