select body as content, pretty_name from static_portal_content where content_id = :content_idIt does work the way it is now, because I'm not attempting to reference pretty_name in the template.
Don't get element_pretty_name, which is "Custom Portlet" in the default case, confused with pretty_name which is the title of the specific portlet you are working with. pretty_name is being retrieved from the database by the select query, and is showing up properly in the edit form, but doesn't seem to be available in the template.
Ola, it seems to be working ok without that, but it might be dumb beginner's luck. :)
I should explain about the "body as content" thing. Originally the text that appears in the static portlet was stored in a varchar called content. I changed that to a LOB, and in order to do the upgrade script it had to have a different name; I used body. But I didn't want to make people who had custom templates change the variable name, so I changed it in the database and left all references to it under the original name.