Hi as far as I understand this is your own datatype, right? If so you need to define function "title" in your datatype, this function should return a string, which than will be used in object name.
/*!
Returns the content of the string for use as a title
*/
function title( &$contentObjectAttribute )
{
$countryObject = $contentObjectAttribute->attribute('content');
return $countryObject->attribute( 'name' );
}
I do not know your datatype (how is it written and what is returned as datatype content) so the code above mostprobably will not work for it. ;)
I'll check this contribution, maybe I can help you. It is not possible to use attributes of attributes, so if the identifier of your attribute is in the class is country, then you can only use name pattern <country> and make sure that function title of the datatype returns string you need. I'll look to this datatype probably tomorrow.
Ok, I have not tested it, but from the code of the datatype it looks like to use name of the chosen country in the object name pattern you should just write identifier of your class attribute:
<country>
please let me know if it does not work.. make sure that you used correct identifier of your class attribute..
I had already tried <country> and it didn't work, but for a different reason. After changing the object name pattern of a class, the names of existing objects are not updated, even after clearing all caches. You have to re-publish each existing object individually in order for the object name to be updated.