How do I programatically create a custom file attribute?
Permalink 1 user found helpful
Hi all,
I'd like to create some standard file attributes during my package install and was wondering if someone could post a snippet or point me to a add on that does this. I couldn't see it in the docs and my google terms don't seem to be working.
Is it the same as CollectionAttributeKeys?
E.g. can I go:
Thanks & cheers
Andrew
I'd like to create some standard file attributes during my package install and was wondering if someone could post a snippet or point me to a add on that does this. I couldn't see it in the docs and my google terms don't seem to be working.
Is it the same as CollectionAttributeKeys?
E.g. can I go:
FileAttributeKey::add(AttributeType::getByHandle('text'), array('akIsAutoCreated' => 0, 'akHandle' => 'my_handle', 'akName' => 'My Attribute'));
Thanks & cheers
Andrew
http://www.concrete5.org/documentation/how-tos/developers/how-to-in...