Jump to content

horizontal menu - categories show sub-categories on hover


Recommended Posts

Hello

Thanks for trying to help me. My english is not too good, but I try

Categories appear normally in top menu horizontal. And the sub categories appear when hovering the category names in the menu and that is exactly what we want.

 

Yet, one can click on the category name and one gets then on the page category which shows :

sub-categories, no-image and a white page (since we put nothing in description and the products are in the sub-categories, not in the categories)...

 

So what we want is simply hover the categorynames in the menu which displyas the sub-categories and then one clicks on the sub-category and goes directly to the page sub-category...

 

Am I understandable?

Link to comment
Share on other sites

category.tpl located in your theme directory and remove this code

		{if isset($subcategories)}
        {if (isset($display_subcategories) && $display_subcategories eq 1) || !isset($display_subcategories) }
		<!-- Subcategories -->
		<div id="subcategories">
			<p class="subcategory-heading">{l s='Subcategories'}</p>
			<ul class="clearfix">
			{foreach from=$subcategories item=subcategory}
				<li>
                	<div class="subcategory-image">
						<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img">
						{if $subcategory.id_image}
							<img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html':'UTF-8'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
						{else}
							<img class="replace-2x" src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
						{/if}
					</a>
                   	</div>
					<h5><a class="subcategory-name" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">{$subcategory.name|truncate:25:'...'|escape:'html':'UTF-8'|truncate:350}</a></h5>
					{if $subcategory.description}
						<div class="cat_desc">{$subcategory.description}</div>
					{/if}
				</li>
			{/foreach}
			</ul>
		</div>
        {/if}
		{/if}

then these subcategories will disappear :-)

 

 

hope that this is what youre looking for :-)

Link to comment
Share on other sites

Sorry for not replying sooner...  Holidays (short, very short holidays, yet holidays) and thanks for trying to help me. You're great!

The solution you propose is not exactly what I meant...

 

The horizonal menu consists of categories and subcategories.
When you pass the mouse over the tab of the main category, subcategories appear, that's good.

BUT
When you click on a tab (a category) in the menu bar,  I'd like to have a link #, and not a link to the category page
...

something like

http://monsite.com/#

and not

http://monsite.com/mycategoryname

 

Hope It's a bit esaier to understand

Link to comment
Share on other sites

  • 1 month later...
Hi there 
 
I have a website and my template prestashop has a vertical menu that has categories and subcategories according to the categories and subcategories that have my shop prestashop. I wish I could have my menu to my liking, it is possible to make a menu like ?? 
 
Files and code that I have to use ??? 
 

I hope you can help me, I feel my English is not very good. a greeting 

Link to comment
Share on other sites

×
×
  • Create New...