Jump to content
thirty bees forum

How to remove a single category from sidebar?


Recommended Posts

Posted

I would like to make a 'discontinued' category so I can keep item pages up without them cluttering up space, or having to 301/404 them.
Of course I could easily make the category, however, I don't wish it to show up on the category sidebar, but rather would like to link to it from my footer so it's less conspicuous.

Is there an easy way to remove a single category from the sidebar while keeping the other ones in place?

Posted

You could probably just change the blockcategories.tpl a bit:

		{foreach from=$blockCategTree.children item=child name=blockCategTree}
{if $child.id_category!=yourID}
			{if $smarty.foreach.blockCategTree.last}
				{include file="$branche_tpl_path" node=$child last='true'}
			{else}
				{include file="$branche_tpl_path" node=$child}
			{/if}
{/if}
		{/foreach}

The above might work. I didn't test it...

Posted (edited)

Thanks a lot for this, but unfortunately it doesn't work.

Yes, I mean blockcategories.

Edited by Purity
Posted
Just now, wakabayashi said:

Why not? What happens?

Well, I found the correlating code.
I changed it to what you wrote, and added the category ID number, but it appears as if nothing happens at all.

If I'm understanding this correctly I add the category ID to where it says 'yourID'?

To be honest, I wasn't sure which blockcategories.tpl to change (i have the module folder, but also a .tpl by the same name under /theme/modules) but I tried both separately and it appears as if neither did anything at all. I cleared the cache of course.

Reverted to backup files.

Posted

Yeah it would be correct as you describe (theme folder) it. It sounds a bit strange to me, that nothing happens. 

I am not at a computer with code editor right now. Maybe instead 

{if $child.id!=yourID}

is correct...

Posted
1 hour ago, wakabayashi said:

Yeah it would be correct as you describe (theme folder) it. It sounds a bit strange to me, that nothing happens. 

I am not at a computer with code editor right now. Maybe instead 


{if $child.id!=yourID}

is correct...

This modification seems to work.
+1
Thanks a lot buddy, I really do appreciate the help.

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...