Copy link to clipboard
Copied
I have successfully used cfmenu on a test page. When I put the exact code in my site, it lists the items like bullet items rather than the horizontal menu. Is anyone aware of any conflicts of code with cfmenu? I've compared the two pages and they appear to be the same.
Copy link to clipboard
Copied
I would suspect that you have a CSS style in production that is changing your layout. I will see if I can find you the exact code to look for.
Copy link to clipboard
Copied
Anyone have an answer to this? The strange thing is that the menu works properly on some sites and doesn't on others. I don't see any difference on my sites since they are dynamic and use the exact same code.
Any suggestions? Anyone else having trouble with cfmenu formatting like a bullet list?
Copy link to clipboard
Copied
Do you specifically code type="horizontal"? The only other thing it could be, since you are dynamically generating the pages, is there any chance you are generating a submenu? Submenus of both menu types are always arranged vertically.
Copy link to clipboard
Copied
I'm breaking the code down line-by-line and testing it right now. Very
strange - and probably an obvious problem.
<cfmenu
childstyle="text-decoration:none;"
selectedfontcolor="##ffffff"
selecteditemcolor="##cccccc"
font="Arial, Helvetica, sans-serif"
fontsize="16"
name="testmenu"
type="horizontal"
bgcolor="##666666"
fontcolor="##333333"
>
<cfif submenus.recordcount eq 0>
<cfmenuitem display="#getmenus.menu#" href="/sites/dsp/#getmenus.sitelink#?menuid=#getmenus.menuid#" />
<cfelse>
<cfmenuitem display="#getmenus.menu#">
<cfloop query="submenus">
<cfmenuitem display="#submenus.menu#" href="/sites/dsp/#submenus.sitelink#?menuid=#submenus.menuid#" />
<cfmenuitem divider="true" />
</cfloop>
</cfmenuitem>
</cfif>
</cfloop>
</cfmenu>
Copy link to clipboard
Copied
This is what it's doing. It has to be something so obvious that I'm
overlooking.
http://www.shepherdsvineyard.us/sites/dsp/test/
Copy link to clipboard
Copied
Yep, since you have submenu items they will be generated vertically. To quote the manual "Submenus of both menu types are always arranged vertically". The question now is why they sometimes don't get generated vertically.
Copy link to clipboard
Copied
I don't understand that. Isn't that the point of cfmenu? To have submenus
under the primary menu? Otherwise, why use cfmenu?
Copy link to clipboard
Copied
Yes, I see that they would be "drop-down" which is vertical. What I don't
understand is why they lose the menu button format and go to a list style.
The primary menu items should still be across the page horizontally.
Copy link to clipboard
Copied
I put the exact same code in another directory and it worked. I have no
idea why it isn't working in this directory. I just don't see the
differences between the two.
Copy link to clipboard
Copied
I've narrowed it down, but I don't have an answer as to why.
I have dynamic websites generated from one set of code. When I use the
domain name from my primary site, then the cfmenu works. If I use another
domain name, then the cfmenu does not work. This is when I use the exact
same code in the exact same directory just pointing it to a different domain
name.
I'm still digging. If anyone has any insight, it would be very helpful.
Thank You,
Robin
Copy link to clipboard
Copied
I figured it out. I hope my mistake helps someone else.
I have multiple sites pointing to one directory. Each of those websites
(domains) needed a virtual directory pointed to CFIDE in IIS. Once I set
this up, the cfmenu worked.
Many thanks for your help!
Copy link to clipboard
Copied
Make sure you point your domain to the CFIDE directory or it won't work.