Perspectives allow to create different views in the backend UI and even customize the standard perspective. This feature could be combined with the configuration options already available for the Custom Views.
Perspectives and Custom Views are not intended to be used to restrict access to data
Please be aware that if combined with custom views, the custom view settings must be defined in the
The link is accomplished via the ID.
You can define:
- which trees you want to see
- where it is positioned (left/right)
- the order and which one should be expanded by default
- the available tree context menu items
- the navigation menu items
- the standard elements on the welcome screen
- which portlets can be added to a dashboard
You can define an arbitrary number of perspectives and switch between them via the File menu.
You can restrict the access to certain perspectives via the user settings.
The Configuration File
Please refer to the Example File for further details on how this can be set up.
You can find out there how the default view is prepared and how to add a special perspective.
The table below, describes the most useful of available options in the configuration file.
||string||Path to the icon file.|
||string||The css class added to the icon.|
||array||Array which contain the rows with configuration information like the tree type .|
||string (documents,objects,assets,customview)||What type of elements will be rendered in the tree.|
||string (left,right)||a place, where the tree is initially generated|
||integer||The id of customview elements rendered in the tree. (works only with the customview type)|
||array||that option allows to add changes in the toolbar menu.|
||boolean||ability to hide a specified menu (the available list you can find in the example below)|
||array||You could specify there, which submenus elements you would like to generate.|
In the Example File you can find advance usage. Below, I showed how to create the simple structure which would be use for catalog administrators.
We need only to see
- products (objects from a specific directory)
- search button
To specify the range of objects you're going to use you, you have to firstly add a customview. See the Custom views section to get more details.
The custom view definition would look like that:
[ "treetype" => "object", "name" => "products", "rootfolder" => "/products-workflow", "id" => 1, "showroot" => false ]
Let's update the
website/config/perspectives.php by the new perspective.
"catalog_management" => [ "toolbar" => [ "file" => [ "hidden" => true ], "settings" => [ "hidden" => true ], "marketing" => [ "hidden" => true ], "extras" => [ "hidden" => true ], "search" => [ "items" => [ "documents" => false ] ] ], "elementTree" => [ [ "type" => "assets", "position" => "right", "expanded" => false, "hidden" => false, ], [ "type" => "customview", "position" => "left", "expanded" => false, "hidden" => false, "id" => 1 ] ] ]
I changed the number of elements rendered in the main Pimcore menu.
Also I added two trees. The first (on the right side) for assets and the second on the left side for the custom view with product objects.
The view after switch looks like in the picture.