Embed Create Node into a View Tab

simono71 - October 9, 2009 - 20:44

Ok, well I have not found anything by searching, but perhaps I have entered the wrong triggers.

I am not sure if this is something that can be done or not, but basically here is what I am trying to do.

I want to create some backend tools for my client to make it easier to add and manipulate content.

I have a custom content type, 'Recipes'.

I have a view called 'list_recipes' that shows an overview of all the recipes and allows bulk operations such as promoting to front page, deleting etc.

What I would like is to create a menu item 'Manage Recipes' that when you go to that page it has two tabs

'List' and 'Add'. 'List' would be the default tab, and would basically display the view 'list_recipes' described above, allow them to quickly see all entered recipes, edit or delete them. The 'Add' tab would present you with the 'Add new Recipe' node page. This way the client can easily add and manage data from a single page, simply by changing the tab.

I know how to get the view to show on the page in a tab, I am just not sure how to get the /node/add/recipe page to appear as a tab under my page. I hope that makes sense.

Possible solution, but it's a

couzinhub - October 9, 2009 - 20:55

Possible solution, but it's a bit of work :

If I understand correctly, you want the tabs to be without reloading the page right ? My advice would be to :

1 - Create t view in a block instead of a page (and use ajax)
2 - Use FormBlock (http://drupal.org/project/formblock) to create a block with the /node/add/recipe form in it
3 - Create a page (node type = page) with a URL like '/manage-recipes)
4 - Use Quicktabs ( http://drupal.org/project/quicktabs ) to render both block in a Quicktab block
5 - assign the QT block to the content region, only on the /manage-recipes node.

makes sense ?

____________________________________________________________

en: www.couzinhub.com
fr: www.couzinhub.com

Thanks

simono71 - October 9, 2009 - 21:02

I will give that a try, actually I don't care about using ajax or not.

I really was just trying to replicate the built in tab handling you get from drupal which does reload the page.

 
 

Drupal is a registered trademark of Dries Buytaert.