How To Add a New Page on Admin Panel

I need help , I want a new custom page on admin panel , because I want to make my own crud with approval.

Thanks

You will need to create a controller and a view

controller file:

app/addons/my_changes/backend/my_changes.php

controller content:

<?php

use Tygh\Registry;

if (!defined('BOOTSTRAP')) { die('Access denied'); }

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    return;
}

if ($mode == 'approval') {
    
    //...

}

view file:

design/backend/templates/addons/my_changes/views/my_changes/approval.tpl

view content:

{capture name="mainbox"}

[CONTENT]

{/capture}

{capture name="adv_buttons"}
{/capture}

{capture name="buttons"}
{/capture}


{include file="common/mainbox.tpl" title=__("approval") content=$smarty.capture.mainbox adv_buttons=$smarty.capture.adv_buttons buttons=$smarty.capture.buttons}

For this example I use “My Changes” add-on and needs to be activated.

I hope the above is useful to you.

If you need professional help in developing it please PM me.

4 Likes

Please also do not forget about official documentation

1 Like

yes I followed that btwy, But thanks to @hungryweb my path on views is corrected, In addtion can you help me override the menu.tpl ? I just need to add new menu on it

Noting they are about to roll out a new backend you might want to hang back, could change … otherwise find the menu tpl, copy it, modify it, activate my_changes addon and place it as an override tpl.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.