Expand my Community achievements bar.

SOLVED

Number formatting in Sightly

Avatar

Level 6

Hi,

I'd like to know if to have a number formatter in sightly we need to make similiar we do for date formatting? 

http://blogs.adobe.com/experiencedelivers/experience-management/date-formatting-sightly/

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

Another option is to build your Sightly component to use Java. THen use Java to perform numeric fomatting on the value

https://docs.oracle.com/javase/tutorial/java/data/numberformat.html

See this community article:

https://helpx.adobe.com/experience-manager/using/creating-sightly-component.html

That article will show you how to build a Sightly component with data-sly and Java.

View solution in original post

5 Replies

Avatar

Level 6

Hi @smacdonald2008,

Thanks for you reply, but I didn't find anything about number formatting, could you point me that?

Thanks

Avatar

Correct answer by
Level 10

Another option is to build your Sightly component to use Java. THen use Java to perform numeric fomatting on the value

https://docs.oracle.com/javase/tutorial/java/data/numberformat.html

See this community article:

https://helpx.adobe.com/experience-manager/using/creating-sightly-component.html

That article will show you how to build a Sightly component with data-sly and Java.

Avatar

Level 6

Hi,

Thanks for your reply.

That's was my first idea, I'd just like to know if in Sightly itself there was already anything ready.

Thanks

Avatar

Employee

In Sightly there is, for now, no formatting is available. You would need to implement this via Java/Javascript.