Anil
Anil

Reputation: 63

How to add page in back office module in prestashop

how to create new page in module back office in prestashop 1.6 and how to pass url of that new page into anchor tag. any help appreciated.

<a id="desc-tag-new" class="list-toolbar-btn" href="#"></a>

Upvotes: 0

Views: 895

Answers (1)

Guybrush Threepwood
Guybrush Threepwood

Reputation: 1303

There is a manual and a programmatic way.

If the module is for private use, you can simply go to Administration > Menus and create a new menu page by associating it with a module, class and parent.

If you want to distribute the module, you should opt for the programmatic way. You have to create an AdminController extending the ModuleAdminController class and put it in /controllers/admin/. In your module's installation method, you should create and save/add a new Tab (which extends ObjectModel, hence the save/add ambiguity depending on your PrestaShop version). You should then set the properties of the new Tab object as you would from Administration > Menus.

Keep in mind that in PrestaShop, a new Menu page is associated with a specific ObjectModel subclass.

Upvotes: 1

Related Questions