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.
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); pre>
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);