Hi,
I am trying to implement a feature for users to rearrange the existing blocks on the home page (netvibes way http://www.netvibes.com/ ).
Users with any role anonymous/authentic can rearrange the blocks to customize the home page but only authentic user's customization will be saved.
I am using Panels 2 to define the homepage layout and looking for a way to integrate this feature with panels. I saw several discussion thread related to this but could not find a solution to my problem. I came across ayman module "panels-dnd" (a test module not committed to drupal CVS ) http://aymanh.com/files/panels_dnd-0.1.tar.gz for drupal 4.7. It integrates with panels 1 and does exactly what i am looking for.
So i was thinking of writing a similar module (as panels-dnd) which can integrate with panels 2 and can work on Drupal 5.X.
I need advice and suggestions with making this entire idea work. I barely have a month to implement this idea as the site is going live on last week of January.
Thanks to you all in advance.
Thanks
Shorav
Comments
MySite
Also try MySite, which does this on a per-user basis but does not allow anonymous users to drag-and-drop.
--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3
--
http://ken.therickards.com/
I tried My Site Module
Thanks for your reply. I have tried mysite module before posting this message thread :). I like the way mysite module interact with jquery update and jquery interface module. The reason i didn't mention this module, because it does not integrate with panels 2.
My requirement is:
I will design a home page with several blocks on it
I want these blocks to be dragged and dropped around on the home page.
So lets say if i design the page layout using mysite and tweak permissions in a way that any user can move the blocks around while only authentic users settings will be saved. But it gives me limited option to define content layout.
I want to use the panels 2 because of its great flexibility. Ability to put mini panels inside panels and let blocks/content define as tabs inside the panels. It will give me fine grain control over my page layout.
Do you have any ideas/suggestions about integrating it with panels 2. So that i can control the fine grain content layout using panels 2 and move the blocks around and save settings mysite way.
I want to know the community view.
Thanks
Shorav
Panels & Mysite
There is work being done to add the ability to have panel settings per user. If Ken is would make droplets into a content type (and that's really easy to do) then you could use both. I'm hoping to do just that with my advanced profile project.
Michelle
See my Drupal articles and tutorials or come check out life in the Coulee Regio
Panels 2 admin like drag and drop for front end
A perfect module would be, one which integrates with panels 2 and let admin flag the added blocks in panel as draggable or fixed. For example if i add 5 blocks in panel and set bottom 3 as draggable. Now user can drag and drop the bottom 3 blocks around while the top two blocks sit fixed at its position.
At present in panels 2 admin can drag and drop the added contents to fix the content position. If user can do the same on the front end (with the displayed blocks) it would be great with some restrictions as which block is movable and which is not.
Thanks
Shorav
I have to admit, something
I have to admit, something like the above isn't really in my plans. There are a lot of complications with the mixed admin/output ideal and I don't want to deal with them.
Locking
Yea, we have the concept of "locking" in MySite, but it is unpredictable. It only works well if you force all users to use the same layouts.
--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3
--
http://ken.therickards.com/
How do i use Locking
Hi,
The page layout will not change. Users can change the order and position of the blocks (except the locked blocks) but can't change the page layout. So, if its a 3 column layout user can't change it but can reorder the blocks (except the ones which are locked).
Can you please explain me how locking works in mysite module?
Thanks
Shorav
What I'm saying is that in
What I'm saying is that in Panels, the 'layout' can actually be more than just where things are. The layout is a plugin that defines how many columns and such, but it can also define a lot more.
There are also style plugins, which have some effect on rendering, but I'm not sure if they have enough to put in a drag and drop system. Drag & drop requires a lot of extra markup, but it might be able to accomplish it. It could be a fun task.
Haven't had time
I did some integration testing back on the alpha releases of Panels 2, but have not had time to revisit.
No. It provides limited options and an API to extend those as you see fit.
In the interim, can you not make Panels into Blocks, and then the Blocks into MySite Droplets?
Or, perhaps the better solution is to allow Panels to be converted into Droplets, the way that Views can be. So it seems from a pure MySite angle, what you want is the ability to place Panels directly onto a MySite page.
Content integration with Panels is a goal, by the way, there are some UI hurdles to overcome. I think (hope) that the community view is that merlin and I will find some time to solve these issues in a common way so that the two modules move closer together.
--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3
--
http://ken.therickards.com/
Converting Mini Panels to droplet
Hi,
While playing around with panels2 and mysite i found that mini panels are reflected as blocks in mysite module. So i defined few mini panels and converted those to droplets. It seems to solve my core problem. Now i am looking to iron out the GUI to remove the scroll bar.
Thanks
Shorav
scroll bar
See section 2.5 of MySite's main README file.
See http://drupal.org/node/189243 for more details.
--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3
--
http://ken.therickards.com/
Thanks for pointing out the thread
Thank you for pointing out the link. It is really helpful. I have not yet tried the solution. Will be doing it tomorrow.
Thanks a lot
Shorav
The biggest issues right now
The biggest issues right now are selection. If we can come up with a good UI tool to do hierarchical selection that will work within the modals, I think we'll be okay. But right now this is still a problem that needs some work. I need to deal with this just for taxonomy term selection.
Yes
To come full circle (for me anyway), this is the issue that held up MySite integration with Panels 2. I can expose MySite content to Panels, but not in a good UI. That is because MySite, by design, can create hundreds (or thousands) of content options, which the Panels UI -- the modals that merlin mentions -- was never designed to handle.
See http://drupal.org/node/194341
--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3
--
http://ken.therickards.com/
This isn't completely true;
This isn't completely true; the panels UI can handle adding any arbitrary node, in that it uses an autocomplete field to actually choose the node. However, this isn't always the best form of choosing, and other selectors aren't really implemented yet.
I need to get a better idea of what kind of selectors are needed.
Agreed
This is true for node content. For other types of content (terms, user posts) I had the issue that the autocomplete mechanism that MySite uses is not quite compatible with Panels.
I do not mean to imply that this is a Panels defect. The different content/context UI approaches that the two modules use is merely an obstacle to easy integration.
--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3
--
http://ken.therickards.com/
Totally, and it's one I need
Totally, and it's one I need to solve. Every time I want to add something javascripty to the modals that isn't already supported, I run into this. I think I've figured out the solution, though, and need to try to implement that soon. Beta is going out tomorrow, so I'm not sure this'll make it in pre-beta, but it's important enough to fix post-beta. As it is, there is a design deficiency here (and you'd be right to point some of this out as a Panels 2 flaw) that needs to be addressed to make the things you need to do possible.
Hi Merlin,
Hi Merlin,
While we work towards bringing panels 2 and mysite module closer can we have drag and drop like functionality on a panel page. Just like the admin panel where admin can and arrange the position of an added content just by dragging and dropping. I read a discussion between you and ayman regarding ajaxifying panels 2 on this thread http://drupal.org/node/87120. What i am looking at is like an implementation here http://aymanh.com/files/portal/ integrated with panels 2 module.
I define a panel say three column layout, added contents at specific positions, panes and and made it my home page. Now the users should also be able to move the blocks around and reorder the position of contents. There has to be different level of permissions for it like save users settings etc. While anonymous users settings can be saved in cookies.
Philosophy behind the whole idea is to give a user freedom to view content the way he/she prefers to view rather then being stuck with site developer's choice of content ordering.
I am in love with panels module and use it for all my projects. I think this functionality is a natural extension of panels module.
There is no reason that a
There is no reason that a layout can't provide drag & drop functionality for that layout; but it is a significant amount of work to do so.
Right now the javascript I'm using to create the drag & drop stuff isn't flexible enough to be able to be used in a generic manner like that. It's a deficiency that I hope to address; I know a lot more now than I did when I wrote the stuff, and so I hope to do some serious fixing at some point in the near future.
That said, it isn't in my plans to write a layout that does this. This is primarily because there are thousands and thousands of things that become possible with Panels, but someone still has to implement them, and I cannot implement them all. I have a long list of things I want to work on, and user-level drag & drop isn't really on that list. I encourage others to work on that, though, because at worst it's something that can be plugged in.
I am planning to work on it
I am planning to work on it. At first i will have to get familiar with panel 2 APIs. As there is no documentation available for the panels 2 api, so it will take some time for me to figure it out. I will Document it on WiKi as i go along.
Thanks
Shorav
How Locking Works
Hi Ken,
Can you please explain me how locking works in mysite module?
Thanks
Shorav
Different thread
We should move MySite-specific discussion somewhere else.
For that question, see http://groups.drupal.org/node/7895
--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3
--
http://ken.therickards.com/
Locking + Sroll Bar
Hi Ken,
Thanks a lot for suggestions and comments. Locking is working fine for me (i did a rigorous testing. My requirement spec does not permit user to change the layout.) Thanks a lot for pointing out the exact line in the css for scroll bar, it saved a lot of my time.
Thanks
Shorav