Cportlet Equivalent In Yii2

Just wondering, what is the alternative / equivalent of Yii 1.1’s CPortlet in Yii 2.0?

Also looking or this !

thank you.

My goal is this:




Task              Category

---               ---

id                  id

name            categoryName

Category_id



In a form to create a new Task, I have a dropdwon list with existing categoryNames.

I need a button to create a new categoryName and populate the dropdown list if needed.

In yii 1 I used a Cportlet ajax popup to manage this.

I’m looking to the best way to do this in Yii2.

Thank you for your time answering my questions.

I hope I’ll soon be able to answers others :slight_smile:

Olivier.

It does not look like all the zii extensions are being carried forward. I might be wrong. I can’t find anything on Portlet being available in the Yii core. The zii extension started as an official Yii extensions repository. Something outside of the core code. CPortlet was one of them. There is a GIT Portlet class available here. You will have to import it into your Yii2 project. You would have to look at it for your needs or create your own conversion of CPortlet.

If you are using with bootstrap - then you can use the Panel as a portlet alternative in Yii 2. You can render a panel and tables inside the panel … using Html::panel method from my yii2-helpers extension (Html helper)

Kartik,

Panel looks like the better approach. Thank you.