Jump to content

Notes for the users in the backend


louisstephens
 Share

Recommended Posts

I wasn't quite sure where to put this as this not really a firm question but more of a discussion (if this needs to be moved, I do apologize). I am remaking an internal app for work and most of the users log into the admin to create pages etc etc. With the old app, I have noticed a lot of unpublished pages, duplicated pages, abuse of the system (my fault as I didn't do anything to set guidelines of maintenance etc etc) and was wondering how some of you "post" notes for the  user.

I was going to send out an automated email once I create their user account with all of useful documentation, but I feel that they will either read it once and delete it or just skip right over it. In my mind it would be nice to have a place where this information was always available, but I have a feeling that it would just be ignored after a while. Unfortunately, I dont have the time to watch the backend like a hawk for any wrong doings, but lately the old app has become the unlawful wild wild west (the page tree is getting out of hand).

Link to comment
Share on other sites

@Macrura has created a couple of modules for adding help documents to the admin:

Myself, I just create a PW page (hidden from non-superusers in the admin) that contains instructions for users. I use some custom jQuery in the admin to append an "Instructions" view link to the admin footer so the document is always easily accessible from any page.

To provide some intervention against duplicate pages you could try a hook like this:

$pages->addHookAfter('added', function(HookEvent $event) {
	$page = $event->arguments(0);
	$pages = $event->object;
	// For pages with a particular template...
	if($page->template == 'basic_page') {
		// Check for existing page with the same title
		// You could get fancy by making this more fuzzy
		// E.g. exclude short words and then look for titles that contain the remaining words 
		$existing_page  = $pages->get("template=basic_page, title={$page->title}");
		if($existing_page->id) {
			// You could use the edit URL or view URL as appropriate
			$url = $existing_page->editURL;
			$event->wire()->warning("There is an existing page with this title <a href='$url' target='_blank'>here</a>. If you have added a duplicate page by mistake please delete this page.", Notice::allowMarkup);
		}
	}
});

 

  • Like 2
Link to comment
Share on other sites

 Share

×
×
  • Create New...