HOWTO : having another ddblock based on my own custom type

Your Ad Here

Hi,
I have followed the "Advanced slideshow tutorial" and ddblock works fine.
So I feel like using another ddblock to provide content of a CCK type I have defined myself.

May I embed the fields "field_image", "field_slide_text" and "field_pager_item_text" into my custom CCK type ? (those which have come with advanced slideshow installation) ?
OR
Shall I define my own "field_image_own", "field_slide_text_own" and "field_pager_item_text_own" to make that second ddblock work without crashing the original advanced slideshow ddblock ?

As a Drupal beginner, I do not master all its mechanisms. So your help will be welcome.
Thanks in advance.
Jerome

Re: HOWTO : having another ddblock based on my own custom type

Yes, you can use the fields from the news_item content type.

Consequences are that the structure of the CCK tables in your database changes.

With a changed database structure of CCK fields the names of the fields change, so you have to change them also in the preprocess functions.

If you use other fieldnames the structure will not change and it will not have consequences for the first slideshow.

Hope this helps you further.

Re: HOWTO : having another ddblock based on my own custom type

Thanks for your help !
With your help and some topics on drupal.org, I guess I have to uncomment drupal_set_message lines in preprocess functions anytime I embed the concerned fields in a new custom type.
That gives how fields have been renamed when CCK database structure was modified.
Finally, template.php has to be updated with new names displayed by drupal_set_message

Let's try now : that's the only way to know if I've understood.
Thanks again
Jerome

I got it ! Your advice was

I got it !
Your advice was good : the second ddblock with my own content type works !
I also had to duplicate the "if" statement in both preprocess functions :
one for the original news_items view, the other one for my own_items view