Metadata – Tridion 2009 – Parent Folder TCM of Retrieval Components

Quick question. I’m building a template building block (TBB) that retrieves the metadata schema value from the component’s parent folder. For example, all components listed in this folder Will share the same title, but with different content. So, I created a pattern and attached it to the parent folder. This way, if I want to change the title of all components, all I have to do is change the meta on the folder Data value.

I have this parent folder that is hardcoded using TCM, but I need to grab it dynamically. Does anyone know how to grab the TCM of the parent folder?

Thank you for your help.

RepositoryLocalObjects all have a “.OrganizationalItem” Attribute, it will return the container of the object.

Things along these directions should get you started:

Component component = (Component )engine.GetObject(package.GetByName(Package.ComponentName));
Folder parent = (Folder)component.OrganizationalItem;
ItemFields folderFields = new ItemFields(parent.Metadata, parent.MetadataSchema);

Quick question. I’m building a template building block (TBB) that retrieves metadata schema values ​​from the component’s parent folder. For example, the ones listed in this folder All components will share the same title, but have different content. Therefore, I created a pattern and attached it to the parent folder. This way, if I want to change the title of all components, all I have to do is change the folder

I have this parent folder that is hardcoded using TCM, but I need to grab it dynamically. Does anyone know how to grab the TCM of the parent folder?

Thank you for your help.

RepositoryLocalObjects have a ".OrganizationalItem" attribute, which will return the container of the object.

Things along these directions should get you started:

Component component = (Component)engine.GetObject(package.GetByName(Package.ComponentName ));
Folder parent = (Folder)component.OrganizationalItem;
ItemFields folderFields = new ItemFields(parent.Metadata, parent.MetadataSchema);

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2723 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.