I'm sure @rwaldron will be able to propose something better than so much copy paste. We can probably reuse getContent if we modify it a little.