Jump to content

[solved] Block Categories in Dynamic mode behaves strangely, closes subcategories in live environment but not locally


Recommended Posts

Hi community,

HELP! This thing is driving me nuts.

Locally I have the basic blockcategories module running in dynamic mode behaving exactly like I want to. Clicking the +/- (up/down arrow in my case) makes the menu expand and display the subs. Clicking on a sub will take me to the subcategory page WHILE THE LISTING OF SUBCATS FOR THE CURRENT PARENT CATEGORY REMAINS OPEN.


Say my pages are:

ANIMALS
dogs
cats
elephants

If I click on "cats" the dynamic list will still be open on the cats page.

Having moved the shop to the live environment, I can't get it to work like that.
As soon as I click on any subcategory and go to the subcategory page, the dynamic list closes.

Since the only file I have not copied from local to live is the blockcategories.php file I'm thinking I must have completely forgotten a tweak or something I've done in it. But I certainly don't remember it. (And copying it causes the live site to crash for some strange but probably not altogether unrelated reason).

Also, now that I know a bit more, wouldn't treemanagement.js be the best place to "fix" a thing like this?

Anyone got any ideas... it must be a very simple thing I've forgotten...

Thanks a ton in advance...

/Erida

Link to comment
Share on other sites

Ah!

Never mind... funny how writing something down suddenly makes the brain less fuzzy sometimes...

The key was of course in the blockcategories.php file. A quick file content comparison lead me to remember doing this excellent modification:

One way of modifying the block categories dynamic setting

The mod requires some code to be added to a class file. Sice the class file in my case is not part of a theme (like the instructions claim) I didn't realise the live installation did not have those lines. Hence the modified blockcategories.php crached the site.

Everything is working as expected now.

Hopefully someone else reads this and benefits from it anyway.

/Erida

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