In a plugin I am creating I want to add a property to some entries.
Ideally this property would be hidden from the admin user, as I don't want them to edit it.
At the moment I am trying to do something like this (simplified):
$criteria = craft()->elements->getCriteria(ElementType::Entry);
$criteria->section = 'dogs';
$entries = $criteria->find();
foreach ($entries as $entry) {
$entry->secretName = urlencode($entry->title);
craft()->entries->saveEntry($entry);
endforeach;
But this produces the error 'Property "Craft\EntryModel.secretName" is not defined.'
Does anyone know how to do what I am trying to do? Is there a way to set a new property to just this section?