Mura CMS- How to display extended attributes using attribute set name

205 Views Asked by At

I have a couple attribute sets basically to display store hours. I have attribute set named as Sunday, Monday till Saturday. And each attribute set has 2 extended attribues named open and close which are dropdowns with values from 7 AM to 5 PM. since all the open and close attribute names will be same, I don't know how to access a particular day's (in my case attribute set) open and close fields.

E.g of what i am trying is

Attribute set name = Sunday

extended attribute name = Open -> values from 7AM to 5PM -> input name=open

extended attribute name = Close -> values from 7AM to 5PM -> input name=close

Attribute set name = Monday

extended attribute name = Open -> values from 7AM to 5PM -> input name=open

extended attribute name = Close -> values from 7AM to 5PM -> input name=close

and so on. All the open and close extended attributes have same name resp.

I want to know how to access a particular attribute set's open and close fields. I know I can keep the Label same and change Name but is there any way to access those with attribute set name.

1

There are 1 best solutions below

1
On BEST ANSWER

I recommend to use unique names for extended attributes, even if they are in different attribute sets. Why don't you prefix the attribute with the day? mo_open, mo_close, tu_open, tu_close, ...