Jump to content

How to Disable Main Category Page


m4tt300

Recommended Posts

Dear


if you look at my website www.buonissimo.kz/en on the top bar you can click either on


 


1) products


2) gift set blue


3) detox with water


 


When you click on products there are all the subcategories and all products from 2) and 3). 


 


http://www.buonissimo.kz/en/52-products


 


I don't like the style of this page so I want to disable 1) making not clickable / accessible. Is it possible?  


 


Thank you in advance for your help. 


 


M4


 

Link to comment
Share on other sites

Hi, thanks for your answer.

 

No, I think you didn't understand what I would like to do. 

 

if you look at my website www.buonissimo.kz/en on the top bar you can click either on

1) products

2) gift set blue

3) detox with water

 

I don't want to allow users to click on 1) but only on 2) and 3). However on the back office you must create 1) in order to have 2) and 3) (subcategories). Do you understand?

Link to comment
Share on other sites

Oh, I get it!

You want the drop-down menu to be active, but you don't want the Products button to be clickable.

This might be solved by either

1) editing the core modules file

2) looking at this http://www.w3schools.com/jsref/met_element_removeattribute.asp and removing the link using Js/jquery

http://stackoverflow.com/questions/970388/jquery-disable-a-link and you can fiddle with it as you wish. Not clean, but simpler than editing the module..

  • Like 1
Link to comment
Share on other sites

Hi,

 

you have your JS/CSS cached, so I don't know what files you have there, but this line might help you.

$('ul.sf-menu > li > a.sf-with-ul:nth-child(1)').contents().unwrap();

It deletes link for the first a tag in the menu. So it will only work, when this Products drop down menu will be on the LEFT of the menu. Try adding it to some .js file, preferably if the module has its custom .js.

Link to comment
Share on other sites

it's not possible to disable this page, you can only do some workarounds like:

 

1) disable "click" feature in each instance of link to this page.

note that shop has got many features to display this link (menu, block categories, some other custom modules)

 

2) in category. tpl file you can add code like:

 

{if !$smarty.get.id_cat=="5"}

CODE OF TPL HERE

{if}

 

page will appear only if category page is different than 5

instead of 5 use id of category you want to disable / hide

Link to comment
Share on other sites

In superfish-modified.css (http://www.buonissimo.kz/modules/blocktopmenu/css/superfish-modified.css) change this

.sf-menu a {
	display:block;
	margin-right:2px;
	padding: 0 22px 0 20px;
	line-height:34px; /*Ingrandisci barra menu*/
	border: 0px;
	text-decoration:none;
}

to this:

.sf-menu a,.sf-menu > li {
	display:block;
	margin-right:2px;
	padding: 0 22px 0 20px;
	line-height:34px; /*Ingrandisci barra menu*/
	border: 0px;
	text-decoration:none;
	color: #fff;
	cursor: pointer;
}

This should do the trick.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...