Expand my Community achievements bar.

SOLVED

Multiple granite:class

Avatar

Level 6

Hi All,

I added "granite:class" property to a text field in a component dialog. I made this field of type "String" and "Multiple". Added 2 class names to this fields, saved the changes and checked my page. I could only see the first class name. I wanted to know if "granite:class" is always a single value? And, how can I have more than 1 class added to it.

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Shaheena_Sheikh 

 There is no need to declare it as string array. You just need to mention your classes with spaces thats it.

 

e.g

granite:class="class1 class2 class3"

 

Thanks

Dipti

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Shaheena_Sheikh 

 There is no need to declare it as string array. You just need to mention your classes with spaces thats it.

 

e.g

granite:class="class1 class2 class3"

 

Thanks

Dipti