adding a new attribute value

Permalink
Hi,
I may be mixing the names of attribute things here so bare with me please.
I am trying to give an attribute a value using php really. the attribute is created already from the dashboard and all I would like to do is add a value.

been looking thought the docs and forums and can't really find a simple solution to this. I may be missing something.
hopefully someone can enlighten me lol

I should mention it is a user attribute. however I don't simply want to give the user an attribute I want to add a value that can be given to the user.

hopefully this make sense

Thanks

mikeyt55
 
pvernaglia replied on at Permalink Reply
pvernaglia
What type of user attribute? Text, checkbox, etc?
mikeyt55 replied on at Permalink Reply
mikeyt55
select, I just ended up making a model to add a value

was hoping there was an easier way like
$att = $ui->getAttribute('att_handle');
$att->addValue('newValue');
enlil replied on at Permalink Reply
enlil
I just did this yesterday to set a select page attribute for a package I'm building. From within a block view do:

$cobject = $this->getCollectionObject();
$cobject->setAttribute('attribute_handle', 'value');