Does CMenu have dinamic look?


In the documentation, it says, it has multi-level menu. It shows the menu items on next line.

I am a bit confused about, does it have sliding effect on that?

For example, shown in this example.

Multi-level Menu

or no effects yet, just menu items(child items) on next line.

How to make it work like shown in above link?


Not sure about CMenu , but the extension SMenu by spyros

is multi-level with sliding effect, look for it in the extensions

CMenu doesn’t have any special styling by default. You need to implant the styling to your needs

If you want to extend the generated html (as apposed to just implanting css/js), you can extend CMenu and override renderMenu() and/or renderMenuRecursive() methods

Oh… Thanks. that helped. But one more little question!

CMenu has facility to have multi-level menu.

But provides no css/js. Why so? Wouldn’t it be nice to have that too? Or some method to provide your own implementation and attach it to CMenu.

We figured the user would have to change the default style most of the time anyways. We may add one later though.

If you want to have it automatically register css/js files, you could create a new method registerAssets(), and call this from run() or renderMenu().