We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Create a new entry in the admin side menu | Forum

Christophe Tricaud
Christophe Tricaud Feb 21 '20
I am trying to add a shortcut in the admin side menu to go directly to a page concerning a plugin. This page exists but I have to go thru all plugin, select the one I want and click on preference.


I added an entry in ow_base_menu_item but I don't know how the router in the MVC is working, and what I have to do so when I click the new link I go to the right page? The entry is showed on the menu, but I have a 404 error since this route does not exists.


I was wondering if there is somewhere a table of all the routes?


Thank for your help


Christophe Tricaud

Paris, France

Christophe Tricaud
Christophe Tricaud Feb 21 '20
Looking at the code on the route.php, I understand that the generated URI myabe set by ecah substr with a slash.


The URI I want to reac is admiun/plugin/cacheextreme so I tried admin_plugins_cacheextreme with no success

Paul
Paul Feb 21 '20

Hope to understand you question, here is an example


PARTS_CTRL_Tech = class PARTS_CTRL_Tech extends OW_ActionController
a80 = public function a80($params = NULL) 


the path of the controller is = ow_plugins/parts/controllers/tech.php


// For Landingpage:

OW::getRouter()->addRoute(new OW_Route('repair-manual', 'repair-manual/a80', 'PARTS_CTRL_Tech','a80'));



// For the first category

OW::getRouter()->addRoute(new OW_Route('repair-manual-main-page', 'repair-manual/a80/:section_url', 'PARTS_CTRL_Tech','a80'));


// for Subcategories

OW::getRouter()->addRoute(new OW_Route('repair-manual-page', 'repair-manual/a80/:section_url/:chapter_url', 'PARTS_CTRL_Tech','a80'));



Example is working here

https://www.toyota-supra.com/repair-manual/a80

The Forum post is edited by Paul Feb 21 '20
Christophe Tricaud
Christophe Tricaud Feb 21 '20
Funny Paul, I am really interested by your toyata community for one of my client! I just sent the url to him yesterday! Did you developped it?


I quite understand what you say: however I am not developping a plugin but using one that exists. I would like just to add a link in the menu with out programming: I thought this may be done thru the database or the admin panel.


Thanks for your help


Christophe

Paul
Paul Feb 21 '20
Yes, I developed it.



Yes, the menu is working throuh the "base_menu_item" table, which is join the "base_document" table


The Admin menu has 7 definied types (the main categories) it is not possible to create a new one. So you have to add your menu link to one of the 7 types


The routePath (the link) musst be an existing route from a plugin or the core.


EDIT: you can use externalUrl for an static url:



    public function findMenuItems( $menuType )    {        return $this->dbo->queryForList("SELECT `mi`.*, `mi`.`key` AS `menu_key`, `d`.`class`, `d`.`action`, `d`.`uri`, `d`.`isStatic`FROM `" . $this->getTableName() . "` AS `mi`LEFT JOIN `" . $this->documentDao->getTableName() . "` AS `d` ON ( `mi`.`" . self::DOCUMENT_KEY . "` = `d`.`" . BOL_DocumentDao::KEY . "`)WHERE `mi`.`" . self::TYPE . "` = :menuType ORDER BY `mi`.`order` ASC", array('menuType' => $menuType), 24 * 3600, array(self::CACHE_TAG_MENU_TYPE_LIST, OW_CacheManager::TAG_OPTION_INSTANT_LOAD));    }



The Forum post is edited by Paul Feb 21 '20
Attachments:
  adminurl.JPG (18Kb)
Christophe Tricaud
Christophe Tricaud Feb 21 '20
Thank you for your help, it works fine.


Did you use a commercial template or you develop your owns?


Christophe

Paul
Paul Feb 21 '20
It's my own theme, based on simplicity. But there is a lot of customization of basic functions via my own plugins.
Some Funktions were not possible to make via plugins so there a some little changes in the core system. But this website is based on the one core installation using an own plug-in for a bootstrap theme on the main page: www.toyota-supra.by
Christophe Tricaud
Christophe Tricaud Feb 21 '20
Great job!
Patricia Zorrilla Leader
Patricia Zorrilla Feb 21 '20

Christophe Tricaud,

This plugin:

https://developers.oxwall.com/store/item/1685

Do what you want and more, you'll find it very useful

AppXprt
AppXprt Feb 23 '20
Nice work Patricia!
kalvindarwan
kalvindarwan Jun 6 '23
Without scripting, I would like to simply add a link to the menu. I figured I could do this by using the database or the admin panel. - retaining walls auckland
james an
james an Jul 3 '23
Remember to evaluate your requirements, consider the different ladder options available, and prioritize safety when using them. By following these tips, you'll be well on your way to mastering the art of climbing stairs and completing your tasks with confidence. https://laddersafetyrules.com/best-step-ladder-for-elderly-2023/
Priond
Priond Aug 16 '23
Determine how the routing is handled in the MVC (Model-View-Controller) framework or software you are using. Routing defines the mapping between URLs and corresponding actions or controllers. Explore Donkey Kong  and master survival skills to overcome the challenges the game offers.
Qhaaf Bedding
Qhaaf Bedding Aug 16 '23
Explore Qhaaf Bedding's exquisite bedsheets online sale. Shop conveniently from home and enjoy incredible discounts on their wide range of bedsheet designs.
Mannat Clothing
Mannat Clothing Aug 16 '23
Mannat Clothing presents a versatile collection of casual dresses for women, combining comfort and style to elevate your everyday fashion effortlessly.
Bagerz Bags
Bagerz Bags Aug 16 '23
Explore the timeless charm of khussa shoes at Bagerz. Discover a wide selection of ladies khussa in various designs and shop online to add elegance to your ensemble.
Panache Apparel
Panache Apparel Aug 17 '23
Discover the best western clothing online Pakistan at Panache Apparel. Upgrade your wardrobe with our fashionable and trendy collection.
Aspire Bedding
Aspire Bedding Aug 17 '23
Aspire Bedding offers an exceptional range of bed spreads that can add a perfect final touch to your bed. Aspire's bed spread comes in different colors and patterns, which can perfectly complement any decor style.
kalvindarwan
kalvindarwan Dec 20 '23
Whatever the case may be, we have you covered and can’t wait to help you out. San Diego Fencing Co.
Pages: 1 2 »