Posted by rpeters on February 2, 2011 at 10:25pm
I was wondering is there a module or a feature in views where that user can edit a content in a view instead of going to find that content that is being used in view.
I was wondering is there a module or a feature in views where that user can edit a content in a view instead of going to find that content that is being used in view.
Comments
Views Form Fields
I have not tested or used it, but "views_ff" is supposed to be like that.
http://drupal.org/project/views_ff
NOTE: The module is not considered production ready, but perhaps the author just needs some encouragement.
You might end up wanting to write your own Forms API module that calls the views for display, and uses the FAPI module code for "editing". You would be editing content, not a view, but that's not important to the end user if it all works.
Editable Fields
http://drupal.org/project/editablefields might be what you're looking for.
One more way
You could also accomplish this using Lightbox2 and Rules:
1. Install and enable the Lightbox2 and Rules modules.
2. In your View, add the Node:Nid field and hide it from display.
3. Add a Global: Custom Text field such as this:
<a href="/node/[nid]/edit" rel="lightmodal">Edit this post</a>4. Create a Page Redirect Rule in Rules that redirects back to your View after editing content of that type.
As is often the case, you need to figure out which option works best for you in your situation.
Node Edit Link
A very easy solution is just to add a node-edit link to the node template or the view template. For example the following snippet put to your node.tpl.php will add an edit link for user role admin. This link is also shown in the view, if you have a full node view.
<?php if ($is_admin) print ' <div class="floatRight"><a href="/node/'. $node->nid.'/edit">[edit]</a></div>' ?>Jürgen Brocke
"The 'Killer-Apps' of tomorrow's mobile infocom industry won't be hardware devices or software programs but social practices."
(Howard Rheingold)
I do this all the time to
I do this all the time to give website editors the ability to change the content in blocks. I use draggable views so they can order the items and then I just add a field to the view which is aptly called Note: Edit link.
Here's what my fields section of the looks like for a simple Service Times admin page. The nice thing about using the built-in function is that you gave the ?destination= so right after a save they are taken back to the same admin page from which they clicked edit.
Fields
Node: Title Service Name
Node: Body Time
Node: Edit link Edit
Content: Order 9999
Benjamin Lotter
"Delight thyself also in the LORD and He shall give thee the desires of thine heart." ~Psalm 37:4
Ben is correct... Node: Edit
Ben is correct... Node: Edit Link -- add the field in your view and you can give your editors or admins a quick and easy way to get to the edit screen straight from the list of nodes! I use this frequently and it works like a charm.
-Jeff