Best way for sub-nav


I want to create a main nav and a sub menu which changes. I think a widget for this is "too" complex" for this easy kind of thing, is there a $this->render ("html-file") method or something like this?

Thx ;)

is renderPartial what you are looking for?

Ok but hm, for a sub nav, i want to place it in the "main" layout. And then somewhere in the sub layout. Cause it chanes depending on the page. In rails there was something like this:

In php then it would be something like this:

In mai.php (layout) btw why is the config name main.php and the main layout? this should be changed :wink:

echo $this->renderPartial('name')

and in the view file:

echo name->Filename or something like this :wink:

Does this help? http://www.yiiframew…oc/cookbook/28/