Need help regarding dynamic drop down menu modding

Im using the free dynamic drop down menu mod ( [url]http://forum.cs-cart.com/showthread.php?t=11324&highlight=drop[/url] ) and my dilemma is that Im trying to use a different image for each drop down category (see this for an example [url]http://j.imagehost.org/0101/finaldraft.jpg[/url] ). You can see the menu implemented on my test site test.livingcontemporary.com



Short of using static html and manually having to update the code each time I make a category or subcategory change I understand Ive got 2 options:


  1. Mod the db to allow a custom image for each category.
  2. Mod the menu template and add which image matches to which category.



    I am trying option #2 as I know very little about mysql or how this might effect normal category blocks, but Im not having much luck and I believe its solely my ignorance.



    Any thoughts from you experts out there? Ive got some paypal $ for anyone that can help me out with this.

[quote name=‘Tirade’]

2. Mod the menu template and add which image matches to which category.

[/QUOTE]



The easiest way I think I would handle this is to make a css class for each of the top level categories named similar to their seo name. For example, the class for the dining rooms would be “top_dining-room”. This css class would adjust the location of the category text to the bottom and have the category unique image be a background image on the upper part of the dropdown area.



Then in the “skins/YOURSKIN/customer/addons/hor_menu/views/categories/components/categories_hor.tpl” file I would change the following code:


```php


  • ```

    to this:

    ```php

  • ```

    I might have the system's seo variable name wrong, you can get the correct value with the smarty debug console.

    Edit: One more thing that I forgot to mention. Increase the z-value for the drop down part of the header. It is currently going behind your flash section and is not usable.
  • Thanks again for your help as always. I’ll give this a shot tonight and see if I can make it work (proxy issues keep me from even connecting to my ftp server from the office). If anyone can confirm the seo variable name please let me know as I do not have the smarty debug console.


    [quote name=‘adodric’]The easiest way I think I would handle this is to make a css class for each of the top level categories named similar to their seo name. For example, the class for the dining rooms would be “top_dining-room”. This css class would adjust the location of the category text to the bottom and have the category unique image be a background image on the upper part of the dropdown area.



    Then in the “skins/YOURSKIN/customer/addons/hor_menu/views/categories/components/categories_hor.tpl” file I would change the following code:


    ```php


  • ```

    to this:

    ```php

  • ```

    I might have the system's seo variable name wrong, you can get the correct value with the smarty debug console.[/QUOTE]
  • [quote name=‘Tirade’]Thanks again for your help as always. I’ll give this a shot tonight and see if I can make it work (proxy issues keep me from even connecting to my ftp server from the office). If anyone can confirm the seo variable name please let me know as I do not have the smarty debug console.[/QUOTE]



    Smarty debug console is just an option you can turn on in the admin->appearance->settings. You just need to be logged in as an admin in the user part of the cart to update the popup window variables from it.

    [quote name=‘adodric’]Smarty debug console is just an option you can turn on in the admin->appearance->settings. You just need to be logged in as an admin in the user part of the cart to update the popup window variables from it.[/QUOTE]



    Funny, I tried using that when I first installed cs-cart way back and it didnt work. I think the issue ended up being Chromes fault but I never messed with it again. I know almost jack when it comes to anything outside of css/html.



    Oh regarding the z-value, I never even use IE anymore so I wasnt aware of this. Thanks!

    [quote name=‘Tirade’]

    Oh regarding the z-value, I never even use IE anymore so I wasnt aware of this. [/QUOTE]



    I’m using Firefox version 3.5.9 on this machine at work. This is where I noticed it. I tried adjusting the z-value with firebug and the menus still didn’t load over the flash. Not sure if the value was just not being accepted or if it is something else.

    [quote name=‘adodric’]I’m using Firefox version 3.5.9 on this machine at work. This is where I noticed it. I tried adjusting the z-value with firebug and the menus still didn’t load over the flash. Not sure if the value was just not being accepted or if it is something else.[/QUOTE]



    Thanks it works fine on my FF 3.6.3 and Chrome installs, but not on IE. I think I had this issue before and I need to make some changes to how I embedded the flash (this is more of a flash issue than browser I believe).

    Just to update this thread for anyone else who may be trying something similar. I ended up using adodric’s suggestion above but instead of using seo url variables I used category ID’s.



    So as he said, create a CSS class for each category using the correct ID (example top_1) then change the following code:






  • to


  • For the Menu issue you must do three things to solve this problem :

    1. in the object tag add the following parameter

      [COLOR=“red”][/COLOR]
    2. in the embed tag add the following attribute

    3. add the same name-value pair to the following script

    Yes that sounds correct, that is how my current flash banner is embedded but on the test site I just simply tossed it in for placement and have not added the transparent values yet. Ironically it works fine on my home and office PC’s running FF 3.6.3 so I never really noticed it.