by admin on December 11, 2010
As you (if you’v at least installed and explored Drupal) know, Drupal‘s Admin panel is not comfortable for clients. It’s mostly developer centric and not similar to other common content managing panels. But, sometimes clients may need to manage some type of content. Recently I’ve faced this situation and made a simple, generic admin panel that only offers managing selective contents. Now I am going to tell you the how I’v done it. If you follow the steps, it should take hardly 30 minutes.
I’m assuming that –
- You have already worked with Drupal and understand it’s basic terminology.
- You understand and can manage Roles, Permissions and Blocks.
- You have worked (at least can work) with Views module.
Suppose the node-type we will let the client manage (add/edit/delete) is “property”. Now, within few steps, we’ll build a Manage Property panel. We’ll use Admin and Client to mean the role of you and your client. Let’s start.
- Create a view using views module (type will be “node”) and name it “manage_properties”.
- In Filters section, add node-type = property. Add additional filters if needed e.g. is_published, user etc.
- You can add some exposed filters (e.g. node title, category etc.) so that the client can search/filter contents easily.
- In Fields section, Add node title first. Then add 2-3 other fields that will help client to identify and find out property. e.g. property type, location etc. At last, add Edit link and Delete link fields. Change label of Edit link as “Actions”
- In Basic setting of view, set
title = Manage Properties, Style = Table, Use pager = Yes, Distinct = Yes, Access = Role(select client’s and admin’s role from Access options)
- From Style options, place Edit and Delete links in Actions column together. Check Sortable checkbox for title and other appropriate columns.
- You can sort results by
post_date, DESCfrom Sorting section.
- We’re almost done. Now add a page display of view and set the path of this display as ‘manage/properties’. If you want, you can add this page to menu as well.
- Set the Add Property link In Header of page view. Style it (e.g. right aligned, bold etc.).
- Save the view and check the output. Tune up for your clients use.
Ok. Now the page is ready. Create similar panels for other content types that your client needs to manage.
The next concern is, how the client will reach to these pages? There are two easy ways. Either create a menu and add these pages to that menu. Or Place a block on sidebar (or anywhere) containing the links of these pages.
Please go through the following checklist when you think you’r done-
- This menu/links block (navigation for created manage pages) are visible and accessible by only Client and Admin role, not for the whole world.
- All links (add/edit/delete) are working. After edit/delete, redirecting to this panel.
- Client’s role has permission to edit/delete (at least edit/delete own contents) this node-type.
More Let’s do with Drupal are coming up! keep checking.