instead of using views, on some occasions, I want to write custom code to display a list of content. I know how to create ctools content type plugins, and in here I could create my EntityFieldQuery to display my content and allow it to be embedded. I was wondering if there are any other options for making my custom code available for embedding in a panel other than creating a ctools content type plugin as mentioned. Ctools content type plugin feel a little verbose for for the task...
I definitely understand your problem with a ctools pane feeling verbose.
Unfortunately I don't have a great fix. I tend to copy an old content type to a new one and edit names and such.
What you make not know is that the normal
single => TRUE property of a content type can be switched to
FALSE allowing the code to create multiple panes in a single content type. (Actually I think
FALSE is the default, so you don't even need to).
This allows you to share a lot more code between several panes that act similarly.
Another, simpler but more limited option is Fieldable panels panes, which basically allows you to take an entity, put fields on it, and stick it directly into a variant. If your needs are simply to display simple content, that could be enough, but this isn't enough when more complex logic is needed.
Actually a pane that requires a
EntityFieldQuery context as an argument and then basically just themes it would be very interesting. There's probably use for at least a sandbox that provided the context and content type for that. :)
I'll try to write up more details if necessary, but look at
plugins/content_types/custom/custom.inc for an example of a content type that does the above.
Someone may also have taken the time to write a drush command to generate a content type from a template. Haven't looked around for one though.
Use blocks. You can start from here.