We are planning to create an event system that will create/update pages based on a keyword's meta data when a component gets classified using the same. For example, I am creating a product which has 2 fields - Brand and Product Group - both of which come from keywords. When I create Product component and select the brand as Brand A and Product Group as PG1, I need to a) Create a Product Detail page under Brand A as well as update a product list page for brand A b) Update a product list page under Product Group PG1
I am planning to do this using an event system by attaching a metadata schema to the keywords that would capture the tcm uris of the page to be updated and Component Templates to be used.
But I am not able to figure out how I can get the meta data of the keyword from the even system. Can someone help out here?
Following is the code that I have so far, but I am not able to get the id of the keyword that the field uses from here to get it's metadata schema.
Schema schema = (Schema) component.Session.GetObject(component.Schema.Id);
ItemFields schemaFields = new ItemFields(schema);
KeywordField kwField = (KeywordField)schemaFields["ProductType"];
Thanks, Aravind