News

back to news

1.1.3 Update Including new Admin SideBar Post Date: 10/23/2017

CORE UPDATES

  1. Modules icon can be image relative path to module assets: ex.'icon' => '/Module/Name/Assets/icons/icon.png'
  2. A3 admin is now Mobile friendly

Sidebar Interface

With this release we're introducing a new feature in the admin: the Sidebar. The idea is that a module can export its functionality to be used inside the Sidebar container and be available to users without leaving the Pages or Pattern admin screens. You can see how to set it up below

Setup.php Example: (in your module)

'extra' =>
[
'type' => 'admin.sidebar.pages',
'adminSidebarClass' => 'Module/PageSpeedInsights/PageSpeedBuilder',
/*Icon that will apper into the sidebar*/
'icon' => '/Module/PageSpeedInsights/Assets/icons/icon.png'
],


The 'adminSidebarClass'

class PageSpeedBuilder implements \Atlantis\Helpers\Interfaces\AdminPageSidebarInterface
{
/*return sidebar icon title*/
public static function getSidebarName()
{
/*title that will appear into the page sidebar*/
return trans("Run Speed Audit");
}
public static function getSidebarActionUrl()
{
/*return route for ajax method*/
return 'module/pagespeedinsights/loadSidebar';
}
}

The method behind this route must return json response that contain 'view' this is the main sidebar view that will be loaded and the post $request will contain the folowing information about the page:

  • page_id
  • version_id
  • language
  • page_url
public function loadSidebar(Request $request)
{
/*(MAKE YOUR MAGIC ON THE PAGE*/
$view = \View::make('pagespeedinsights::sidebar' , $result)->render();
return response()->json(
[
'view' => $view
]
, 200);
}

Here are the JS Utilties you will need for your sidebar enabled module

Global methods to show hide sidebar loader when ajax is proccessing:

  • atlantisUtilities.Sidebar.showLoader();
  • atlantisUtilities.Sidebar.hideLoader();

CORE FIXES

  • 'data-storage' attribute work with link, and scripts fix
  • Patterns listing issue

NEW MODULES

  • Page Speed Insights (using Google API)
  • Visual Quiery Builder for Pages