DH
Asked
Hi,
I would like to add some local new functions; I have created the entries in **themes\default\admin\views\header.php** at the bottom :
```php
...
<li id="picsoo_items_exp">
<a class="submenu" href="<?= admin_url('picsoo'); ?>">
<i class="fa fa-arrow-right"></i>
<span class="text"> <?= 'Export items to picsoo' ?></span>
</a>
</li>
...
```
°) The new menus points appear correctly in the menu after "Reports", that's what I wanted and that's ok.
°) I have created the directory **picsoo** at same level as products, quotes, returns, .... (in **themes\default\admin\views**); inside, I have put the code needed including **index.php**
°) the problem is : the **themes\default\admin\views\picsoo\index.php** is never called; when I hit my new menu point, it displays the dashboard and the focus is placed on the dashboard menu entry
Maybe I have missed something ? must I register my new code (class) somewhere ? or must I do something else ?
thanks in advance for your help,
sincerly,
Domi.
I would like to add some local new functions; I have created the entries in **themes\default\admin\views\header.php** at the bottom :
```php
...
<li id="picsoo_items_exp">
<a class="submenu" href="<?= admin_url('picsoo'); ?>">
<i class="fa fa-arrow-right"></i>
<span class="text"> <?= 'Export items to picsoo' ?></span>
</a>
</li>
...
```
°) The new menus points appear correctly in the menu after "Reports", that's what I wanted and that's ok.
°) I have created the directory **picsoo** at same level as products, quotes, returns, .... (in **themes\default\admin\views**); inside, I have put the code needed including **index.php**
°) the problem is : the **themes\default\admin\views\picsoo\index.php** is never called; when I hit my new menu point, it displays the dashboard and the focus is placed on the dashboard menu entry
Maybe I have missed something ? must I register my new code (class) somewhere ? or must I do something else ?
thanks in advance for your help,
sincerly,
Domi.
- DHAnswerededit :
I have also added the following line in **app\config\routes.php** :
```php
$route['admin/picsoo/(:num)'] = 'admin/picsoo/index/$1';
```
but no luck, same prob.
Domi. - DHAnsweredfound by myself, I need to create a picsoo.php in controllers and Picsoo_model.php in Models.
is the route necessary in routes.php ?
Domi. - MSAnsweredHello,
Yes, once you created the controller, there is no need to add route. Please refer to CodeIgniter User Guide at https://codeigniter.com/userguide3/index.html
> Please be informed that we don't offer support for modifications and modified versions. You are allowed to do it at your own risk as per license.
Thank you - DHAnsweredThanks Mian !
Domi. - Login to Reply