Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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')
like image 958
ZolaKt Avatar asked Dec 01 '25 14:12

ZolaKt


1 Answers

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.

like image 76
The Pixel Developer Avatar answered Dec 03 '25 03:12

The Pixel Developer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!