51 Posts
alanski
10 years ago
5
Topic

I want to write a plugin for custom meta data and use any SEBLOD field value for the custom meta tag.

How can i access the cck fields for an item / content view within a plugin?

Get a Book for SEBLOD
4229 Posts
Kadministrator
10 years ago
1
Level 1

check sd live plugin code

51 Posts
alanski
10 years ago
0
Level 2

Thanks Klas that looks like just the thing!

Really appreciate you pointing me in this direction

51 Posts
alanski
10 years ago
0
Level 1

Mmm not quite getting it from that example.

Is there not a way of including some core cck api / includes to access the extended article object in a system plugin. I thought SEBLOD overrided the article object but perhaps not at the stage of system plugins?

4229 Posts
Kadministrator
10 years ago
1
Level 1
$cck = new CCK_Rendering();
$cck->initialize();
$value = $cck->renderField('yourfieldname');
echo $value;
$cck->finalize();

This should output your fields value, same code works in module so it should work in plugin too, you just need to pick the right event that executes after component has already been processed.

51 Posts
alanski
10 years ago
0
Level 2

Thanks Klas, I will give this a whirl

Get a Book for SEBLOD