Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Multiple granite:class

Shaheena_Sheikh
Level 4
Level 4

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
Dipti_Chauhan
Correct answer by
Community Advisor
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
Dipti_Chauhan
Correct answer by
Community Advisor
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