I tried out linodef and bueditor on my blog, and it works as advertised. However I ended up having to create one button for each content type I wanted to be able to link to. So one button for "Blogs", one for "Pages", one for "Stories", etc.
It would be more interesting if one could insert views in the buttons, instead of just content types. Thus one could construct different views to use with different button configurations for different groups of users.
The view integration would, of course, need to be a separate module, in order to not integrate the whole linodef with views directly, just as linodef bueditor integration is a separate module.
For me, the administrator, a view with exposed filters for a lot of searching would be nice. For a blogger a view showing only his blog entries would be interesting, for a translator a view showing only untranslated content, and content under translation would be great.
Of course, for a default view it would be ok just to list all nodes of a certain type.
This should be a higher priority than integrating with images, as the use of views will be a neccessary and powerful addition to any image handling, especially if you see the direction http://drupal.org/project/img_assist and http://drupal.org/project/imagebrowser are going.
Views also lets the user filter out content based on language, which is a must for many sites.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | linodef_buttonsapi_rc3_basic_viewsupport2.patch | 15.09 KB | Roi Danton |
| #2 | linodef_buttonsapi_rc3_basic_viewsupport.patch | 8.23 KB | Roi Danton |
Comments
Comment #1
Roi Danton commentedSorry for the delate reply, I was busy last weeks.
You are right, the view integration is important. During my work on inline view integration I've already prepared the Buttons API to support views. So an admin would be able to use a view for a button like you do it with content types/vocabulary/fields. There is still alot to do but this feature will likely be integrated in the next version.
Comment #2
Roi Danton commentedI checked your request regarding exposed filters. The difference of Linodef to imagebrowser/img_assist is:
Currently I don't know how to alter it appropriately when using the view as is (which is necessary for exposed filters). Even the view hooks and view field handlers don't provide a proper solution to retrieve and alter each result row (at least I don't see one). Maybe the views row plugins will be helpful - I'll look into it.
Thus I'm still using the approach with view results where Linodef uses the list of elements the view creates (nodes/fields or terms) and displays them in its known way (as with a list of fields created by field_name).
(Dream: Make inline filter tags as nearly as versatile as the view field object type - then it would be senseful to think about implementing/altering the ready themed view).
So Linodef can't use exposed filters in popup windows (yet). However with the current approach you will be able to use view filters to customize the list of nodes, fields or terms and using view arguments and view displays.
Furthermore this feature will be implemented directly into the Buttons API (no new submodule). The attached file contains some unfinished but commented functions so you get an idea what I'm talking about.
Comment #3
Roi Danton commentedViews are working with this patch. I.e. you enter 'view_terms' into bueditor and the list of the view "terms" is used. The filter you set in the view is heeded as well as the first CCK field you set in a node view (to include fields).
What still needs work is the support for Linodef options you can enter into BUEditor (e.g. translation="en"). From the moment I've changed the options slighty (#434656: Make syntax of link with custom title more consistent.) it is tricky to pass the values to the popup window and autocomplete fields since they only uses paths to submit vars. As long as you don't use options with values for your button list the views will work without problem.
Comment #4
scottrigbyHi Guys - 2 Qs
* I see that [#view_name] will embed the default view, but is there syntax which will generate a link to one of the view's page displays (similar to how [#350085,linktext="My title] generates a link to the node, rather than embedding it)?
* Has anyone generated a button for this?
btw, thx for all this -- Linodef is rockin
Comment #5
Roi Danton commenteda) I've updated the filter so now the linktext option should work as intended for views, too (wait for dev release getting updated by drupal.org). In case you want to have the viewtitle as linktext use the option "viewtitle" instead (see documentation provided with dev version).
If you have further questions or bug reports regarding this issue please open a new issue since the current topic is for using views to create buttons (a different task - a little bit confusing ;) ).
b) Currently there is no button providing a list of available views. However this won't be hard to do in case views api provides a function to list all views that heeds access rights (don't know yet).
Comment #6
Roi Danton commentedI've changed the option caching and encode methods so all new options work with popup and autocomplete fields now. Together with the view feature already available in Patch from #3 Buttons API supports views to create a button, now. Furthermore you can create a button which lists all available views.
Committed to Drupal 6 branch.
Quoting from my documentation:
The following list shows the supported element types as well as the elements that the buttons API returns:
Comment #7
Roi Danton commentedIf you can provide patches to use the themed display of a view to theme a button instead of the view results as Linodef does it currently then reopen this issue.