Guest Posted May 17, 2019 Posted May 17, 2019 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?
wakabayashi Posted May 17, 2019 Posted May 17, 2019 About which categories are you talking? The module blockcategories?
wakabayashi Posted May 17, 2019 Posted May 17, 2019 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...
Guest Posted May 17, 2019 Posted May 17, 2019 (edited) Thanks a lot for this, but unfortunately it doesn't work. Yes, I mean blockcategories. Edited May 17, 2019 by Purity
Guest Posted May 17, 2019 Posted May 17, 2019 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.
wakabayashi Posted May 17, 2019 Posted May 17, 2019 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...
Guest Posted May 17, 2019 Posted May 17, 2019 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now