• Resolved kdc90

    (@kdc90)


    Hello.

    I’m building a simple internal info portal for a company and I want to let guests (employees) change the arrangement of blocks on the front page so everyone can set the most important block in the upper left corner, then the second most important one etc. I would then set the preference in local storage, so it gets loaded everytime they visit this website.

    Any idea if there is a plugin for that or, if I would have to implement it myself, a how-to or where to start?
    Help is much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Do you mean so each user sees their own custom arrangement when they view the page? Everyone can have their own favorite arrangement? The admin dashboard widgets pretty much work that way, you could study the core code to see how it was done.

    I think it could get rather involved to try to replicate that. You’d certainly want to search for a plugin that allows this before embarking on a coding adventure. I personally don’t know of such a plugin, but that does not mean one does not exist.

    I think the essence of the dashboard widgets is every widget has a unique ID. A JS UI allows users to drag and drop widgets where they prefer. The order the widgets appear is then saved in user meta. This ordering is retrieved every time the page is requested and widgets output according to the saved order.

    I suspect the drag and drop UI will be the most challenging part of developing your own solution. You might opt for something simpler, like an order number drop down field for each widget.

    Thread Starter kdc90

    (@kdc90)

    Thank you for your reply and yes, I mean it exactly like you described.

    You may be right that it would be easier but I found that HTML5 is coming with a DnD “API”. I haven’t read that much yet but it sounds easier then rewriting the WordPress Widget page. Will do some more research and probably go with DnD anyway.

    Thanks for the input

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Giving guests ability to rearrange elements’ is closed to new replies.