Pimcore admin sidebar modification

627 views Asked by At

Within the Pimcore admin interface I got a task to add a custom menu after the data objects menu.

Here you can see a screenshot of what I want to achieve: https://prnt.sc/ut9t3v

1

There are 1 answers

0
Blackbam On

You can achive what you want by configuring Pimcore views and perspectives.

Documentation on views: https://pimcore.com/docs/pimcore/current/Development_Documentation/Objects/Object_Classes/Class_Settings/Custom_Views.html

Documentation on perspectives:

https://pimcore.com/docs/pimcore/current/Development_Documentation/Tools_and_Features/Perspectives.html

Here is a sample on how to customize your view as intended:

<?php
// /app/config/pimcore/customviews.example.php
 
return [
    "views" => [
        [
            "treetype" => "object",
            "name" => "H5P",
            "condition" => NULL,
            "icon" => "/bundles/pimcoreadmin/img/flat-color-icons/reading.svg",
            "id" => 1,
            "rootfolder" => "/h5p",
            "showroot" => FALSE,
            "classes" => "H5P",
            "position" => "left",
            "sort" => "4",
            "expanded" => TRUE,
            "having" => "o_type = \"folder\" || o5.title NOT LIKE '%magnis%'",
            "joins" => [
                array(
                    "type" => "left",
                    "name" => array("o5" => "object_localized_5_en"),
                    "condition" => "objects.o_id = o5.oo_id",
                    "columns" => array("o5" => "title")
                )
            ],
            "where" => ""
        ]
    ]
];