Module Menu Styling [solved]

  • Posts: 26
  • Thank you received: 0
13 years 9 months ago #7059

I am a new user of HikaShop and I am finally starting to understand how it works. Unfortunately there is one thing I can't figure out and was not able to find documentation or forum references on.

My website is localized so I can't provide a link to it but I will try to explain as clearly as I can.

Currently I have created and correctly configured one Content Menu Category Listing (In my Joomla Main Menu) named "Shop" and it's associated Content Module (Providing the correct views in the content area of my site). They are working exactly how they should.

At this point I wanted to create a module on the left side of my site that would act as a category navigation menu the same way it does on your demo site.

I proceed to create a new Content Module Category Listing named "Product Categories". I chose the type of layout: "List" and set the "Menu" field to point to the "Shop" menu I originally created. This resulted in a correctly functioning List of the categories in a module on the left side of the page. Unfortunately the list of categories in the module is not styled the same way as the other menu's on my site. It is just bullets and links.

I would really like to change whatever code necessary to make this list styled the same way as the rest of my site. I was unable to find any list styling in the frontend_default.css file and I could not find any documentation on using the "Parameters for Lists", "UL class name" field which seems like the place I would setup a class for the module to use.

Any help would be appreciated.

Thank you

Last edit: 13 years 9 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #7060

It depends on your template, but normally, you should be ok by setting the option modules class sfx to _menu in the options of your module (not the hikashop options, but the joomla options).
Thus, the module's class will become module_menu instead of module which, for most templates, is the class of the menu module. So your categories will display like menu items.

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
13 years 9 months ago #7061

I tried your suggestion but it didn't have any effect.

I am attaching a screenshot of the firebug results after adding _menu to the module suffix.

Attachments:
Last edit: 13 years 9 months ago by wwatty. Reason: Fixed incorrect image

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
13 years 9 months ago #7062

Here are the two modules for comparison:

The menu module for my template normally looks like this:



The HikaShop module looks like this:

Attachments:
Last edit: 13 years 9 months ago by wwatty.

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
13 years 9 months ago #7063

For code comparison purposes this is what the firebug code for the menu looks like. Apparently the ul class looks like the main difference.

In Hikashop the ul class="hikashop_category_list"

In the module I want to mimic the style of the ul class="menu"

Attachments:
Last edit: 13 years 9 months ago by wwatty.

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
13 years 9 months ago #7064

And in fact making the change in firebug from ul class="hikashop_category_list" to ul class="menu" changes the style to look correct as seen in this screenshot. Unfortunately I do not know where that code exists in Hikashop to change it. If you could let me know which file I need to look in, I can fix the problem.

Attachments:
Last edit: 13 years 9 months ago by wwatty. Reason: fixed image

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
13 years 9 months ago #7065

I think I fixed it but please confirm if this is the correct way:

In Joomla Admin I opened HikaShop => Display => Views and chose listing_list.

I changed the same code 3 times in that document from

<ul class="hikashop_category_list<?php echo $this->params->get('ul_class_name'); ?>">

to

<ul class="menu<?php echo $this->params->get('ul_class_name'); ?>">

Last edit: 13 years 9 months ago by wwatty.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #7070

You should leave the code and just set " menu" (without the quotes) in the UL class option in the hikashop options of your module.
That way you will have your attribute like this: class="hikashop_category_list menu"
That way, you will have the default class hikashop_category_list and the menu class both used for the UL tag.

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
13 years 9 months ago #7073

Perfect, that worked. This can be marked solved.

Thank you!

Please Log in or Create an account to join the conversation.

Time to create page: 0.076 seconds
Powered by Kunena Forum