Hello everybody,
I’m new to yii and this is my first post.
I wanted to comment on the tutorial on making menus with CMenu and superfish (http://www.yiiframework.com/doc/cookbook/61/) and it seems I have to leave a post first. So here it is with the comment I wanted to share:
I’ve been struggling with this a bit, and I found some things not so clear (like how and where superfish should be installed. It seemed like it would be picked automagically from some location).
I also found some errors like “$_GET’hierarchyParent’” which should be “$_GET[‘hierarchyParent’]” which I could fix myself, but in the end I couldn’t make it work (now I have it working).
I was very surprised that a simple comment like "//<-- optional" in the layout/main.php could do the magic to replace the static menu by the superfish one.
Now I’ve found the revision control source for the article. There the code seems to be complete and without errors. For example instead of the “// <-- optional” there are 3 or for lines with includes for the html source. With that code I could finally make the example work and figure that I can install superfish wherever I want as long as I point the aforementioned includes to the right place.
So the article is ok, but the rendering has quite a lot of artifacts.
There is still a little bug in the parent id in the sample database entries, where the parent id’s of some menu items are “off by one” and also I don’t think that the “root” entry should be showed, but otherwise it is working nice.