posting attributes to collection index
Permalink
has anyone had trouble getting attributes posted to the collection index table?
The attribute is installed as follows:
and then when posting the collection, attribute posted as follows:
any ideas?
Chad
The attribute is installed as follows:
$pulln = AttributeType::getByHandle('select'); $somecat=CollectionAttributeKey::getByHandle('some_category'); if( !is_object($somecat) ) { CollectionAttributeKey::add($pulln, array('akHandle' => 'some_category', 'akName' => t('Some Category'), 'akIsSearchable' => '1', 'akIsSearchableIndexed' => '1', 'akSelectAllowOtherValues' => true, )); }
and then when posting the collection, attribute posted as follows:
$cck = CollectionAttributeKey::getByHandle('some_category'); $cck->saveAttributeForm($p); $cck->updateSearchIndex();
any ideas?
Chad
K, different question .... I discoverd that the data IS posting...but it's sorta "phantom". see screenshots below. If I edit the field and save, it shows up fine. AKKKKK!!
yup, the server is not seeing the text there. if I edit the table and save it again....the attribute shows up fine.
Any thoughts?
Any thoughts?
for everyone else' benefit:
Attributes (at least the select attribute) post a "\n" before and after any vars. so with the help of Andrew, it comes out to this:
cheers! thanks Andrew!
Attributes (at least the select attribute) post a "\n" before and after any vars. so with the help of Andrew, it comes out to this:
$category = "\n$this->category\n"; $pl->filterBySomeCategory($category);
cheers! thanks Andrew!
Chad