Hi Matteo, I really like your theme and I have been using it to create the new version of my website at pyrn.ways.org

I've asked my members for feedback and they mentioned that it would be nive to have the primary lniks menu displayed as a pull-down menu from the top primary links. Is that something difficult to implement?

I am currently using nice menus in the leftbar, but it seems that it adds to the complexity of the website (according to my user panel). Is it possible to use nice menus in the top primary links, or something like suckerfish menus?

I have been browsing the drupal site, but it seems that my very limited knowledge, I won't be able to find something easily implementable.

Thanks.

CommentFileSizeAuthor
#21 screenshot-nice-menu-msie-problem.jpg198.54 KBspiffyd

Comments

Lioz’s picture

Assigned: Unassigned » Lioz
Status: Active » Closed (won't fix)

mmm sorry but i don't have tested nice menus :(
There are too many additional modules, i think it's impossible for me to test them all.
However i think you can fix everything by editing the css.

gostram’s picture

oki, thanks for the feedback will see what I can do...

gostram’s picture

I sometimes feel completely resourceless trying to make my way through CSS. Basically I have figured out two things:

1. Apparently it is possible to integrate nicemenus (and therefore drop-down menus) in the page.tpl file where the primary links are displayed, in the Marinelli page.tpl that would basically be there:

<div id="utilities">
  <?php print $search_box ?>
  <?php if (isset($primary_links)) : ?>
  <?php print '<div id="plinks">'; ?>
          <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?>
          <?php print '</div>'; ?>
        <?php endif; ?>
  </div>

2. The way to integrate nicemenus is pretty well explained here: http://drupal.org/node/185137. I would basically have to put the following line of code in the page.tpl file:

<?php print theme('nice_menu_primary_links'); ?>

3. That is where I get stuck: Because I am lost in coding, I simply pasted the code in the page.tpl (just below

. That is what I did:
<div id="utilities">
  <?php print theme('nice_menu_primary_links'); ?>
  <?php print $search_box ?>
  <?php if (isset($primary_links)) : ?>
  <?php print '<div id="plinks">'; ?>
          <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?>
          <?php print '</div>'; ?>
        <?php endif; ?>
  </div>

I actually got pretty close from what I want: nicemenus got displayed on top of the Marinelli primary links at the top of the theme as drop-down menus.

4. The issue is that the nicemenus are displayed ON TOP of the primary links. I am guessing that I should combine the two pieces of code so that nicemenus displays only the child pages of the primary links and drops down from those same primary links. There seems to be some redundancy but I am reaching my limits in terms of knowledge. That's really too bad, the drop-down menus from the top primary links would have been a nice feature in Marinelli.

5. I understand you don't which to spend time making sure every module on the surface on the earth fits into marinelli. Thanks anyways for the help

My website is getting slightly better though: PYRN

gostram’s picture

Status: Closed (won't fix) » Postponed (maintainer needs more info)
sleddoggin’s picture

I would be interested in getting this to work too. I will play around with the information you have so far - and see if I can't get it working.

Cheerful Trails,

Christian

gostram’s picture

that would be great. I'm convinced that the solution is not that far away and it would really be a great addition to the theme.

Nicemenus does the trick and can base its menus on primarylinks or on the menu, but I can't get:

1. to relate nice-menus to the blue tabs in Marinelli
2. to change the style of nice menus so that it inherits the look of the Marinelli tabs
3. to put nicemenus up there

Sorry for the lack of information, but at this stage I am pretty much stuck.

Thanks,

dsp6855’s picture

has anyone gotten the drop-down menus to work with this theme? I am wanting to do exactly that.

Thanks,

David

dsp6855’s picture

I got menus to work...

1. Install nice menus and configure according to nice menus
2. print theme('nice_menu_primary_links');
the above replaced the primary links line(s) that were there.
For me this worked as is except in IE (i.e. firefox just worked).
3. In style.css find the #utilities section and add a z-index value that is large. I did 500, but I did not test to see what it could be.

poof... magic!

wadley0’s picture

gostram,

The reason you are getting duplicate menus, is you are calling it twice, (see comments in the following code)

<div id="utilities">
  <?php print theme('nice_menu_primary_links'); ?> //First Call using Nice Menus, the one you added
  <?php print $search_box ?>
  <?php if (isset($primary_links)) : ?>
  <?php print '<div id="plinks">'; ?>
          //This next line is the standard call to the drupal primary menu
          <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?> 
         //The above line has got to go...
          <?php print '</div>'; ?>
        <?php endif; ?>
  </div>

You need to replace the standard drupal call with the nice menu call as follows:

<div id="utilities">
  <?php print $search_box ?>
  <?php if (isset($primary_links)) : ?>
  <?php print '<div id="plinks">'; ?>
          <?php print theme('nice_menu_primary_links'); ?>  //Nice Menu REPLACING standard
          <?php print '</div>'; ?>
        <?php endif; ?>
  </div>

Or remove it entirely as dsp6855 has done.

cosmicdreams’s picture

Thank you, Thank you, Thank you dsp6855. I've been working a day on this. Couldn't understand why my menus wouldn't show event though all the js and other css was fine. This bug is futher explained here: LINK

scrubba’s picture

Hi all
I thank the above comments for helping me get primary drop down menus working using nice-menus and the marinelli theme.

To clarify some of the above
I first set up nice menus in the manner that this module suggests in the README.TXT ,Specifically:

2. At Administer --> Site building -> Modules (admin/build/modules) enable the module.
3. Configure the module settings at Administer -> Site configuration -> Nice Menus (admin/settings/nice_menus).
4. Configure the Nice Menus block(s) at Administer -> Site building -> Blocks (admin/build/block), setting the source menu and menu style, etc.

I then followed wadley0 's advice and changed the file page.tpl
(which I found in the marinelli theme folder and which is actually called page.tpl.php in Linux Ububtu which is what I use)
I used the part of wadley0 's advice as follows:

<div id="utilities">
  <?php print $search_box ?>
  <?php if (isset($primary_links)) : ?>
  <?php print '<div id="plinks">'; ?>
          <?php print theme('nice_menu_primary_links'); ?>  //Nice Menu REPLACING standard
          <?php print '</div>'; ?>
        <?php endif; ?>
  </div>

Meaning I replaced that single line:
print theme('links', $primary_links, array('class' => 'links primary-links'))
with the line
print theme('nice_menu_primary_links');

which did the trick to get me rolling with the menus - but in Marinelli I then had to adjust some of the css to make the Primary links look similar to what I had before in the original theme.

To do this - first I followed the instructions from nicemenus again, specifically

"The module includes a default CSS layout file (nice_menus_default.css) which is loaded for all pages. If you don't like the default layout, it is suggested that you create a separate customized CSS file, and replace the default CSS file at Administer -> Themes -> Configure -> Global settings -> "Path to custom nice menus CSS file". This ensures smooth future upgrades as no editing of the module files is necessary. NOTE: you should not edit the regular nice_menus.css file since this contains the "logic" that makes Nice Menus work."

So then I tinkered with my new css file (using a copy of nice_menus_default.css as a starting point) until I got rid of the borders and changed colours etc
However a few things could not be changed -
I could change the width here,
but not the height of the menu boxes, nor the size of the text in my menus which for some reason were showing up a little larger than what I had before.
These things were resolved by tinkering the Marinelli theme css file style.css

I now have only two remaining issues

1. I cannot work out how to have spaces between the primary menu items like original marinelli (with spaces showing background rather than padding color)

2. I Have drop-down menus working well on all browsers except - you guessed it - IE. Tried everything suggested in nice-menus FAQ etc but drop downs flash for a microsecond (sometimes) then dissapear. dang it.

Any ideas?

scrubba’s picture

Ok I have resolved the second of my two problems.
To view menus using IE I had to delete from the Marinelli file style.css
the term
"position:relative;"

from two places -
1) From the section called #page

#page {
	background: white;
	text-align: left;
	margin: 0px auto;
	position: relative;
	/* The entire template's width is set in this class. */
	width: 970px;
	border:12px solid #006d0b;
	}

and also the section called #header

#header {
padding: 0;
margin: 0;
height: 180px;
background: #000033 url(img/banners/rotate.php) no-repeat 0px 0px;
position:relative;
	}

The reason I didn't think this worked at first was because I had not correctly cleared my cache in IE to see the changes after I fixed the file.
Sometimes it takes a cache clear a few reloads button presses with the control button held down.
Seems to work ok now.

cosmicdreams’s picture

scrubba: when I tried appling position relative to the header (I think that's what i did ) that didn't work for me. I had to apply the z-index:5 (or higher) to the #utilities div. I'm actually surprised that worked for you.

nationalwind’s picture

Cosmic: Scubba said DELETE position:relative from #header and #page, not apply it. Works for me. Finally!

smurk75’s picture

nice work Scruby. Thanks for the post.. please let us know if you get the spacing nailed as well!

smurk75’s picture

Install Success, PHPBB works, Nice Menu not working

I installed on phpForum on Drupal 6 and works fine, db working fine. ONly problem is the primary links. My 1st 2 link categories (Nikon & Canon) work ONLY if your logged in. The Camera Wars is the forum link (which is also done under Nice Menu) is active all the time. What could have possibly changed the settings? I've double checked the Block settings, but doesn't make sense because Camera Wars is under Nice Menus which is set to view by all.

Nice scripts, just need to fix the bug if it's a Nice Munu bug......

Thanks! =)

www.canon-vs-nikon.com

smurk75’s picture

Update. I just removed the link and added it back and now it all works. I originaly had the link up before installation and then linked it to phpbbforum after installation, which could have been the cause........

scrubba’s picture

Unfortunately never sorted the spacing, so abandoned the idea for the moment
would still like to hear if other succeed.

spiffyd’s picture

Category: feature » task
Priority: Normal » Minor

subscribed!

nationalwind’s picture

I got it to work a while back, but I don't currently use any sub-menus. It was a few months ago so I can't remember what exactly the changes were, but I think the editing was limited to the following code sections. As you can see, i don't use the marinelli rotating banners anymore. I can't remember if this method of nice menus worked before I changed the banner to a static image file or not.

page.tpl:

<body>

  <div id="utilities">
  <?php print $search_box ?>
  
  <?php if (isset($primary_links)) : ?>
  <?php print '<div id="plinks">'; ?>
          <?php print theme('nice_menu_primary_links'); ?>  
           <?php print '</div>'; ?>
        <?php endif; ?>
  </div>


<div id="page">

  <div id="header">
        ......

style.css:

#utilities {
	padding: 0;	
	margin: 0px auto;
	width:970px;
	height:25px;
	position:relative;
	overflow:visible;
	}


#header {
padding: 0;
margin: 0;
height: 200px;
background: #004700 url(img/banners/linda-kenney-grass.jpg) no-repeat 0px 0px;

	}

/*- Primary links in Header */

#utilities #plinks {
font-size:90%;
left:0px;
bottom:0px!important;

border:none;
position:absolute;

		}

#utilities #plinks ul li {
	display: inline;
	float:left;
	margin-right: 10px;
	border:none;
	}

#utilities #plinks ul li a {
	color: white;
	background: #0C840C;
	padding:5px 10px 5px 10px;
	display:block;
	border:none;
	}

#utilities #plinks ul li a:hover {
	background: #006600;
	color: #fff;
	text-decoration: none;
	border:none;
	}

#utilities #plinks ul li a.active,
#utilities #plinks ul li a.active:hover {
	color: #fff !important;
	background: #006600;
	text-decoration: none;
	font-weight:bold;
	border:none;
	}

I realize my code is probably a mess, but it got the job done.

spiffyd’s picture

Category: task » bug
Priority: Minor » Critical
Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new198.54 KB

@nationalwind et al:

Using your CSS, I'm able to to get Nice Menus working on my Primary Links using nice_menus-6.x-1.1 and Firefox 3. However, the menus don't show on MSIE 7. Can you or any others let me know if you have this same problem or is this just me? Perhaps this is a bug with the Nice Menu module? Attached is a screenshot of my menus comapring FF and MSIE. Any advice appreciated. Thanks!

lameei’s picture

subscribing!!!!

lameei’s picture

@spiffyd

It is working in both IE7 and FF. What i did was:
changing the page.tpl.php from this:

          <div id="utilities">
  <?php print $search_box ?>
  
  <?php if (isset($primary_links)) : ?>
  <?php print '<div id="plinks">'; ?>
          <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?>
          <?php print '</div>'; ?>
        <?php endif; ?>
  </div>

TO

<div id="utilities">
  <?php print $search_box ?>
  
  <?php if (isset($primary_links)) : ?>
  <?php print '<div id="plinks">'; ?>
          <?php print theme('nice_menu_primary_links') ?>
          <?php print '</div>'; ?>
        <?php endif; ?>
  </div>

and also adding the following to "ie7.css"

#utilities {
	z-index: 500;
}

These codes was not mine, all i used was mentioned in this post earlier.

spiffyd’s picture

@lameei...

THANKS! It worked on IE7! Okay... so it turns out, this one snippet of css in ie7.css is what did it:

#utilities {
z-index: 500;
}

My page.tpl.php is already configured the same way you have it so no changes were necessary there.

BTW, did you test the menus with IE6? Do they work? I'll test IE6 as soon as I get back to my personal Vista rig with Windows VM installed... blah.

Thanks again!

lameei’s picture

I have tested it on IE6, it seems that there is a problem with the script, the parent menus are ok but drop down menus not opening.

spiffyd’s picture

I just tested it on IE6 and the menus work as well if that same snippet of css is added to ie6.css!

#utilities {
z-index: 500;
}

If it didn't work for you, what operating system are you using and which SP #? I read somewhere that this may be an issue. I tested with IE6 (6.0.2900.2180) on Win XP Home SP2.

lameei’s picture

Actually I'm using a program which simulates ie6. maybe the issue comes from this software. so i consider it is working till i find a real ie6 somewhere....

;-)

spiffyd’s picture

@lameei...

Ah yes, some of those simulations are not as reliable as using the real IE6. If you do not want to install VM Ware, I'd be happy to test it for you with IE6. Just gimme the URL.

lameei’s picture

@spiffyd

Thanks. acuatlly i'm developing the site offline. as i finished uploading i will ask for your help.

spiffyd’s picture

whoops... i meant Virtual PC for M$FT, not VM Ware - that's for Linux. I can test Konqueror too though ;)

lameei’s picture

OK, now we have primary menu replaced with nice menu but i think there is a problem with breadcrumb menu which does not show the child menus in order. what i mean is that every child menu in primary menu is considered the same as a primary menu in breadcrumb so the "YOU ARE HERE" will always show only one link and it is the same page i am in.
is this only my problem or not?

lameei’s picture

@spiffyd
It is testing time. I did a test on IE6 but the drop down is not working. would you please take a look at it?
here is the link: Rooyeshngo

spiffyd’s picture

Just tested it on the following browsers: Opera 9.6, FF 3, IE 7. All of them had no drop downs in the primary links.

BTW your site loads really slowly. Not sure why but you may want to try optimizing it.

I can confirm drop down menus work though (with Nice Menus). See them in action at my my site which uses a modified form of the Marinelli Giordani theme.

waynedrupal’s picture

subscribed

rams_yandapalli’s picture

Title: drop-down menu for top primary links » Dropdown list
Project: Marinelli » Drupal core
Version: 5.x-1.0 » 6.x-dev
Component: User interface » menu system
Assigned: Lioz » rams_yandapalli
Category: bug » feature

here i am unable to get the dropdown for primary links, i added sublinks to primary links also..I am not getting why.Can you guys suggest me. I am using barlow theme.Pls

maartenvg’s picture

Project: Drupal core » Marinelli
Version: 6.x-dev » 5.x-1.0
Component: menu system » User interface
Assigned: rams_yandapalli » Unassigned
Category: feature » bug

This has nothing to do with core but all the more with Marinelli.

Lioz’s picture

currently i'm working for an integrated-jquery drop down menu for multi level primary links
i think in a few days I'll release it (6x only though)

larrysweb’s picture

Excellent! I can't wait.

lameei’s picture

@spiffyd
Thanks for your time.
as i did not get a response from you (lack of time ;-) i found a pc with ie6 on it. it was not working so i totally removed it from the site.
about the speed i have to say that in some days the speed is good but most of the time it is slow i think the problem is with the host. what is your opinion?

lameei’s picture

tech problem

bplat’s picture

Hi there,

I see

currently i'm working for an integrated-jquery drop down menu for multi level primary links

As I didn't get this to work at all (in drupal 6.6) despite having edited the page.tpl.php file as suggested above I'm certainly looking forward to this integration. Will it also work for multilevel secondary links?

What do you folks set the nice menu block region to? Header, I suppose?

Lioz’s picture

Hi!

the new code will work only with primary links
you can use as many levels you want

i'm having problems with ie6 (i hate it!!) i'll release it as soon as i manage to fix this issue

Lioz’s picture

Assigned: Unassigned » Lioz
Status: Active » Closed (fixed)

included in 6x2.5 version
feedbacks are appreciated! :)

tf5_bassist’s picture

WELL worth the update to the new version, Lioz. This makes me severely happy, at least SOMETHING has gone well today. :D

dvkd’s picture

hi scruba

I am using inova theme , i could get the primary drop down list in internet explorer , but not in Firefox,
what could be the reason?
plz help me

salimshaik’s picture

Issue tags: +dropdown list

Hi all,

i need to display the Archives in dropdown list.
please tell me which module is suits for this.
i was tried using ctools. but it shows in dropdown, but selected item is not working properly.

Please help me on this issue.
thanks

salimshaik’s picture

Hi,just i was fixed this issue in my current project using Ctools module.
it is very useful for drop down selection. enjoy...