1
limecity
Creating submenu
  • 2006/5/23 6:21

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


how do i add a submenu link to the existing module in main menu?

i am trying to mod "myads" module a little.
there is no submenu for it.
hhttp://www.mounthiking.com
all your hiking gears and gadgets


2
DuGris
Re: Creating submenu
  • 2006/5/23 7:20

  • DuGris

  • Core Developer

  • Posts: 67

  • Since: 2004/3/14


You can use multimenu module : HERE

3
limecity
Re: Creating submenu
  • 2006/5/23 11:59

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


hmm but i want it to be in the main menu.
hhttp://www.mounthiking.com
all your hiking gears and gadgets


4
stefan88
Re: Creating submenu
  • 2006/5/23 12:20

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


You have to edit xoops_version.php. There is something like this:

$modversion['sub'][1]['name'] =
  
$modversion['sub'][1]['url'] =
..

5
tcnet
Re: Creating submenu
  • 2006/5/23 12:33

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


You can add/delete a module's submenu links in the main menu by editing the xoops_version.php file located in the module's folder.

Save a backup copy before editing the following files!

1) Look in the module's xoops_version.php file to find the modules main menu settings:
// Menu
$modversion['hasMain'] = 1;


Add your submenu links to the module's xoops_version.php file like this:

// Menu
$modversion['hasMain'] = 1;
$modversion['sub'][1]['name'] = _CLA_SUBMENU1;
$modversion['sub'][1]['url'] = "yourlinkfilename1.php";
$modversion['sub'][2]['name'] = _CLA_SUBMENU2;
$modversion['sub'][2]['url'] = "yourlinkfilename2.php";




2)Look in the module's language directory for main.php and add you sublink's name to the module's language variables:

define ("_CLA_SUBMENU1","Your Sublink1 Name Here")
    
define ("_CLA_SUBMENU2","Your Sublink2 Name Here")


or

You can hard code the submenu name in xoops_version.php by replacing the variable _CLA_SUBMENU1 with your link name in quotes. Like this:
$modversion['sub'][1]['name'] = "YourLinkName";


3) Publish the edited files and update the module in XOOPS Control Panel/Module Administration.

When you select the module in the main menu the new submenu items should now appear.

More xoops_version info here.

Hope this helps!

6
limecity
Re: Creating submenu
  • 2006/5/23 16:02

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


thank you so much.!
its solved!
hhttp://www.mounthiking.com
all your hiking gears and gadgets


Login

Who's Online

432 user(s) are online (369 user(s) are browsing Support Forums)


Members: 0


Guests: 432


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits