• هاست سان
  • با خرید اشتراک ویژه شما میتوانید جدیدترین آپدیت افزونه ها و قالب های زیبا و پرکاربرد زنفورو را دریافت کنید!

    هر ماه یک کد تخفیف 60 درصدی محصولات فروشگاه به کاربران منتخب بخش ویژه اهدا می‌شود

Display a variable as a 'simple' number

وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.

XFFA.IR Bot

پرسنل مدیریت
کاربر ویژه پلاس
کاربر ویژه طلایی
امتیازها 113
راه‌حل‌ها 27
Hi
How can I display a number variable as a 'simple' number in a template?

Example code:
HTML:

{{ $cost ? $cost : phrase('free') : }}
i.e. instead of displaying the $cost variable as 5.00 USD I'd like to simply display[COLOR=hsl(var(--xf-editorFocusColor))] [/COLOR]5.
Is there a built in function I can use, or only use JavaScript?
I found this post:
XF 2.1 - XF template "functions"?
But can't figure out how to use the functions (and if they are...


Read more
 
امضا : XFFA.IR Bot
وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.

موضوعات مشابه

عقب
بالا