Categories menu styling

  • Posts: 36
  • Thank you received: 0
11 years 5 months ago #115530

Hi

Could somebody navigate me please, if/how it is possible to change the style of sub-categeories (2nd level categories). It is any way to distinguish them?
As I marked it on the attached screenshot, at the top of is 1st level (main) categories and lower are sub-categories (2nd level).

thank you for every idea or instruction.

best regards
Dominik

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
11 years 5 months ago #115540

Hi,

Can you explain me what do you exactly want to do to your sub-module ? if you want to I can give you the CSS id or class that you'll have to use if you want to edit your sub-module look, but I'll need a link to that page.

Thanks :).

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

  • Posts: 36
  • Thank you received: 0
11 years 5 months ago #115559

Hi

The link to the page is www.biobox.sk/sk/
But first let me explain you the structure, if you take a look at the attached screenshot (screenshot no.1), you will see that the top left icon menu is hardcoded by URL, it is not dynamic. I try to use the hikashop categories module, but it doesnt work good and it looks very strange (see the screenshot no.2)


So the screenshot no.2 demonstrate how the hikashop builtin module looks like when I used it on my site.

Could you help me please?

thank you
regards
DOminik

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #115624

Hi,

Can you publish that module in order to see its css ? You can create a new menu in order to not display it to visitors.

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

  • Posts: 36
  • Thank you received: 0
11 years 4 months ago #115668

Hi

I published the menu for registered users, so you can create account here www.biobox.sk/MOJ-U%C4%8CET/user/form.html

Thank you
Dominik

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

  • Posts: 2334
  • Thank you received: 403
11 years 4 months ago #115794

Considering what I can see on your website it looks pretty good.
Anyway, if you want to know more about which module/menu to edit, you should do a right click on the element, use the "inspect elememt" function of your browser and you'll be able to see the id of the module/menu in the id of the div.
Thanks to this you will know what you have to edit ;)

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

  • Posts: 36
  • Thank you received: 0
11 years 4 months ago #115865

Hi

Thank you, but I know how to use Inspect element feature in browsers. My question was, to get some practical info how to modify only visual of subcategories, and if it is possible to do that.
To keep the default vizual of main categories and onyl to change subcategories look.

So it is possible using css, or do I need some other changes?


thank you

regards
Dominik

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

  • Posts: 2334
  • Thank you received: 403
11 years 4 months ago #116169

Hi Dominik,

That's exactly what I said ;)
Modules and menus have a specific id which is unique. You can then use the id of the module you want to edit in order to make changes only on this module (using css property only on this id).
However this solution will only work if you plan to do css changes. If you want to totally modify the layout it will be a little bit harder.
In this case you have to edit the layout your are using trough our view edition system (display>views) and add a php condition to display something specific for a module with the given id.
This solution is really interesting if you need to change the element position, css is enough if you're just looking for visual modifications.
If you're interested, I'll give you the php condition :)

Last edit: 11 years 4 months ago by Eliot.

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

  • Posts: 36
  • Thank you received: 0
11 years 4 months ago #116214

Hi

So could you please help me with php condition you mentioned? Could you give it to me?

thank you

best regards
Dominik

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

  • Posts: 2334
  • Thank you received: 403
11 years 4 months ago #116250

Something like this should work:

if($this->itemid=="&Itemid=you-menu/module-id"){
	//your custom code
}else{
 	//content of the view 
}

in the view listing_div for example you should palce this code before
if((!empty($this->rows) || !$this->module || JRequest::getVar('hikashop_front_end_main',0)) && $this->pageInfo->elements->total){
and put the content of the view in the second part of the if().

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

  • Posts: 36
  • Thank you received: 0
11 years 4 months ago #119702

Hi

Thank you for the code, but I'm a little confused where should I insert those two code elements zou provide for me.
Could zou please help me with this a little bit more?

thank you very much

Best regards
Dominik

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 4 months ago #119706

Hi,

As Eliot said, you could add the code in the view file "listing_div" of the category view that you can edit via the menu Display>Views if you're using the "div" layout for your listing (which is the case looking at your screenshots).

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

Time to create page: 0.111 seconds
Powered by Kunena Forum