I have renamed it to Custom Content Publish Feature.
Double click on it bring up the Feature properties editor. This class will encapsulate our ‘logic’ to generate HTML from our list item.
In fact our custom Pages will not be visible to everyone if we don’t actually publish them and the only way to do that is to start the approval workflow. Ten days into development new requirements would come in and the spec would have to be re-visited and re-routed for approval.
Okay fine, workflows are still out of box, what are we doing new in that? Imagine what would happen after a document (like our Functional Spec) is approved? Until the document is approved again it would no longer be in ‘Published’ state.
You will notice as a part of the Event Receiver you’ve a cs file and an xml file called
The Elements file is a kind of glue that binds your code to SP Event framework. element is a placeholder for the full assembly name.
You can also change the deployment scope here from Web to farm etc. I’ll cover xsl transforms and more customizations in a future article. This class will save our transformed html as a file into a given sharepoint library.
If that location is a version controlled document library, then each version of the complete document would be available for anytime reference! Share Point has this infrastructure built in where certain SP objects raise events that can be handled by custom code.
The event of interest to us is the Item Updated event fired by any SPList.
This event is fired every time you make a change and save your list item.
If you have a hook in place you can view the entire content and its current values in Event Receiver.