1283 Posts
Bucklash
6 years ago
2
Topic

Hi folks

Using JCckContent.....

If I am using afterstore, I could use $config['pk'] to get id of article just created and then update it with some stuff.

$data = JCckContent::getInstance(array('joomla_article', $config['pk'])); 

You then alter values like this (there are other ways - feel free to write post about them)

// SAVE IN JOOMLA TABLE WITH BASE i.e #__content
$base = array(
    'title' => 'Some Title '.$config['pk'],
    'alias' => 'some-alias-'.$config['pk']
);
$data = $data->save('base',$base);
// SAVE IN SEBLOD TABLE WITH CORE i.e #__cck_core
$core = array(
    ...stuff...
);
$data = $data->save('core',$core);<br>
// SAVE IN PADLOCKED TABLE WITH MORE i.e #__cck_store_form_[this_content_type]
$more = array(
    ...stuff...
);
$data = $data->save('more',$more);<br>
// SAVE IN UNPADLOCKED TABLE WITH MORE2 i.e #__cck_store_item_content
$more2 = array(
    ...stuff...
);
$data = $data->save('more2',$more2);<br>

Nice

Get a VIP membership
215 Posts
iliil
6 years ago
1
Level 1

Thanks Bucklash !

...is it possible to pass all 3 arrays into the save method at once?

Michal

1283 Posts
Bucklash
6 years ago
0
Level 2

Ha Dont know

Get a Book for SEBLOD