I am trying to define a custom modifier for Smarty templates in my provisioning module. I have tried multiple methods but they all seem to fail.
My first try was using a Hook on ClientAreaPage where my function would register a Smarty modifier:
Unfortunately, when using the modifier in the template file returned by module_ClientArea(), the template is not shown and I get the following error in the Activity Log:
Syntax error in template "file:..." on line 5 "{$object.Size|humanReadable} |" unknown modifier 'humanReadable'
I have then tried this very same way by declaring global $smarty; in my module_ClientArea() function and registering the modifier there, but it did not work either.
I'm at a loss on what to try next, has anyone ever done something similar and made it work?
I'm using WHMCS 7.10 .
Question
nisompic
Hello,
I am trying to define a custom modifier for Smarty templates in my provisioning module. I have tried multiple methods but they all seem to fail.
My first try was using a Hook on ClientAreaPage where my function would register a Smarty modifier:
Unfortunately, when using the modifier in the template file returned by module_ClientArea(), the template is not shown and I get the following error in the Activity Log:
Syntax error in template "file:..." on line 5 "{$object.Size|humanReadable} |" unknown modifier 'humanReadable'
I have then tried this very same way by declaring global $smarty; in my module_ClientArea() function and registering the modifier there, but it did not work either.
I'm at a loss on what to try next, has anyone ever done something similar and made it work?
I'm using WHMCS 7.10 .
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.