I think this is a valuable improvement:

I've enhanced the Ctools plugin code so that the individual Snippets will be returned as individual subtypes and thus will be displayed individually on the "Add content" dialog. This makes Snippets work a little more like other content types when adding them to a Panel. They still appear under the "Snippets" category.

The select list is no longer needed on the settings form.

I also enhanced the feedback in the UI by adding 'admin title' and 'admin info' callbacks.

I made everything backwards compatible. So that if the render function receives a Snippet with the old 'snippet' subtype, it will assume the Snippet name is in the $conf variable. Otherwise, the $subtype variable is the actual Snippet name and that is used instead.

This is my first attempt at mucking with a Ctools plugin to this level, so feel free to critique or reject this patch.

CommentFileSizeAuthor
#1 snippet-As_Subtypes-2036757-1.patch5.11 KBjonmcl

Comments

jonmcl’s picture

StatusFileSize
new5.11 KB

Patch attached

rahul.shinde’s picture

Issue summary: View changes

Thanks JonMcL. Updated code. you can see this diff at http://drupalcode.org/project/snippet.git/commitdiff/8bb44be

rahul.shinde’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.