What Are Attribute "Sets"

Permalink
I'm delving into attributes so that I can learn what I need to know to create and install a custom attribute from a package. One thing I don't quite grasp is the concept of attribute sets. What is the purpose of attribute sets? What is their practical significance?

Even the dev guide on this site doesn't mention them. It talks about keys, categories, and types, but no mention of "sets". Nor can I find any place in the dashboard about them -- no way to create or manipulate them, nothing. What's are they for exactly? I'm befuddled. Can anyone shed some light?

Thanks much,

-Steve

Shotster
 
Shotster replied on at Permalink Reply
Shotster
As best I can tell from the sparse info available, attribute sets are little more than a way to logically group attributes for organizational purposes. They are to attributes what file sets are to files.

If that's the case, though, why is there no UI for manipulating them? What purpose do they serve if they're accessible only programmatically?

Any clarification would be appreciated.

-Steve
mkly replied on at Permalink Reply
mkly
This might not be much help, but I have actually wondered that same thing so I'll throw my quick info here and hope someone comes in with the full explanation.

concrete/elements/dashboard/attributes_table.php

is included in the
concrete/elements/dashboard/users/attributes.php

with an if statement based upon
$category->allowAttibuteSets()

In all my test db's AttributeSets tables are always empty.
The Attribute Category documentation actually tells you specifically to set $allowSets to false
http://www.concrete5.org/documentation/developers/attributes/catego...
$allowSets = false;
AttributeKeyCategory::add('widget', $allowSets, $pkg);


I want to look into this more, I just haven't motivated that time yet. Hopefully someone will have more info.

Edit: Part of this was in response to your question of why there is not UI. There is a UI set up with that if statement I described if you actually have any attributesets.
Shotster replied on at Permalink Reply
Shotster
Thanks for the response, Mike.

I now see that any defined sets appear in a menu when editing an attribute, so an attribute can be "assigned to" or "placed in" a set. What's still unclear is how attribute sets are intended to be used by either a site admin or programmer. Can anyone shed some light?

Thanks,

-Steve
JohntheFish replied on at Permalink Reply
JohntheFish
I have a long list of user attributes to add and I thought that maybe attribute sets would help me organise them. I notice they are used by eCommerce (shipping, billing), but cant work out how to create a set.

So overall, I am wondering pretty much the same as you guys.
Shotster replied on at Permalink Reply
Shotster


Hi John,

C5.5 (currently in beta) provides a UI for managing attribute sets. I don't think the current release of C5 does, although they can be created programmatically (as some devs do in their package installation code).

As for their purpose, it appears they are simply a way to logically group attributes for better organization. If there's more to it than that, it's not obvious to me.

-Steve
ThomasJ replied on at Permalink Reply
ThomasJ
I wonder why this thread died prematurely after the last post of 5.5 being in beta. I am using version 5.6.1.2 and expect that 5.7 will be out soon.

I place a continuation to this thread here but my issue is unique enough to create a new discussion so I moved it to start a one one at:
http://www.concrete5.org/index.php?cID=602610...