Remitur Posted November 15, 2022 Share Posted November 15, 2022 In a template, it may be useful to know domain extension in order to customize available functions... But there's no smarty variable with domain extension: the only Smarty useful variable available is $domain... Question: how can I in Smarty get the right characters of $domain? I.e, in php I could write: if (substr($domain),-3) == '.es') But how can I get the same in Smarty?!?! 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted November 15, 2022 Share Posted November 15, 2022 (edited) {$var|substr:0:30} you can also use {if $var|strstr:".com"} or something like that. Edited November 15, 2022 by pRieStaKos 1 Quote Link to comment Share on other sites More sharing options...
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.