Support ⇒ Modules & Blocks ⇒ 2 CPG Main Menus ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & Blocks

2 CPG Main Menus Reply to topic

Go to page 1, 2 Next

Hi, i am sure i have seen it somewhere but i can't seem to find any links or info..

What im trying to do is have 2 main menus.
1 to show the drop down css menu in the header.
1 to show links on left

I don't want the same links for the drop down as the left main menu hence i would like to have 2 main menus.
I know i would need 2 setups for it to work.

Which is my question.. what do i need to do exactly for it to work correctly on DF2.1

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Litespeed/Apache2.4.23/MySQL5.5.42/PHP 5.6.25/DF 9.4.0.0


Well simple way to do it is code the drop down menu in the head or use default menu for header and code a block with the links you want.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Multiple Setups


i know i can make a new block and re code it all but i was hoping for another way.

In first image im using "blocks TCD Main Menu.php"
I have dropdown cat links in the Main Menu block

In the second image se the "top css menu" in blue
I want to have different dropdown links to main menu

So i wish to know if i can make a second CPGMM for the top to use in the admin area or poss add a new class in the cpgmm file e.g. .menu2 so it only shows in the top css not the main or vise versa.
Attachment: hhhh.gif
Description
Filesize 13.65 KiB
Viewed 6 Time(s)
You are not allowed to view/download this attachment
Attachment: fff.gif
Description
Filesize 14.06 KiB
Viewed 6 Time(s)
You are not allowed to view/download this attachment

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Litespeed/Apache2.4.23/MySQL5.5.42/PHP 5.6.25/DF 9.4.0.0


That is out of my skill level for now. I would say to do what your wanting to do would probably require a partial rewrite of the nav system adding and changing functions to support 2 separate css menus.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Multiple Setups


well im getting closer to working it out.

I have 2 cpgmm icons showing in the admin area
Both working links, all good but they are still both read from the same links.
Once i work it out ill post the results if anyone is interested.
Attachment: 2menus.gif
Description
Filesize 9.65 KiB
Viewed 143 Time(s)
You are not allowed to view/download this attachment

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Litespeed/Apache2.4.23/MySQL5.5.42/PHP 5.6.25/DF 9.4.0.0


I still can't seem to work out how to make the CPG_Main_Menu 2 have it's own links.
Everything i try they still working off the same links from CPG_Main_Menu

Anyone got any ideas?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Litespeed/Apache2.4.23/MySQL5.5.42/PHP 5.6.25/DF 9.4.0.0


I did it three years ago but haven't updated it.

In essence,
  • you need an extra field in cms_modules which duplicates cat_id, say cat_nb, which you need to reference in your admin/modules/cpgmm2.php
  • you need an extra table which is an exact duplicate of cms_modules_cat, say cms_modules_nbcat, which you need to reference in your admin/modules/cpgmm2.php
  • you need an extra table which is an exact duplicate of cms_modules_links, say cms_modules_nblinks, which you need to reference in your admin/modules/cpgmm2.php
  • it might pay to duplicate template/admin/cpgmm.html, say template/admin/cpgmm2.html, which you need to reference in your admin/modules/cpgmm2.php
  • you should also rename the function names within admin/modules/cpgmm2.php, but you've probably already encountered that issue.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


In admin/modules/cpgmm2.php

Change
_modules_links
To
_modules_nblinks

Change
cat_id
To
cat_nb

Change
_modules_nbcat
To
_modules_cat

I keep getting error of

includes\db\db.php
* CMS Warning line 75: On /TEST/admin.php?op=cpgmm2 While executing query "SELECT * FROM cms_modules_nbcat ORDER BY pos" the following error occured: Table 'dragon.cms_modules_nbcat' doesn't exist In: D:\wamp\www\TEST\admin\modules\cpgmm2.php on line: 257

Line 257
	// Load the categories
	$cats = $db->sql_query('SELECT * FROM '.$prefix.'_modules_nbcat ORDER BY pos');

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Litespeed/Apache2.4.23/MySQL5.5.42/PHP 5.6.25/DF 9.4.0.0


"extra table which is an exact duplicate of cms_modules_cat, say cms_modules_nbcat"

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


ok made 2 new tables in the db (copied and renamed tables to suit)

cms_modules_nbcat and
cms_modules_nblinks

added table via phpMyadmin, still same error Sad

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Litespeed/Apache2.4.23/MySQL5.5.42/PHP 5.6.25/DF 9.4.0.0


The error speaks for itself - I can't answer for what you may have done in your database. Presumably your db prefix is cms.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Hi,
I'm not sure if it will make a difference but its a suggestion, did you clear your cache folder?

Cheers

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 2.2.6 / 5.0.45 / 5.2.4 / Dragonfly (9.2.1)


sry for slow reply, better late than never.

Got it working, ty very much Phoenix Very Happy

was a typo my end which gave more problems than anything else.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Litespeed/Apache2.4.23/MySQL5.5.42/PHP 5.6.25/DF 9.4.0.0


Glad to hear it's resolved Smile

DonationsPro for DragonflyCMS & SMF

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


I just updated the site files from the SCM v9

I over wrote the the admin files and lost my 2nd CPGMM
I have tried to replicate as close as i can from the old files but i keep getting "Access Denied" when i click
/admin.php?op=cpgmm2

Any tips as to where i should look?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Litespeed/Apache2.4.23/MySQL5.5.42/PHP 5.6.25/DF 9.4.0.0

All times are UTC
Go to page 1, 2 Next


Jump to: