List of list

Hi there yiiers,

I am now moving from a certain CMS to Yii framework.

In one of my in-development websites, there is a list of list.

I have checked how CListView work to render a list in the system.

However, it seems it only allows 1 list to be processed.

Is it possible to make a list of list to get processed?


<ul>Something 1

  <li><a href="linkto11">Something 1 one</a></li>

  <li><a href="linkto12">Something 1 two</a></li>

</ul>

<ul>Something 2

  <li><a href="linkto21">Something 2 one</a></li>

  <li><a href="linkto22">Something 2 two</a></li>

</ul>

The data is from a database so that for each <ul>, get a query of <li>s




database


ul table


id: 1

name: Something 1


id: 2

name: Something 2




li table

id: 1

ulid: 1

name: Something 1 one


id: 2

ulid: 2

name: Something 2 one


id: 3

ulid: 2

name: Something 2 two


id: 4

ulid: 1

name: Something 1 two



Could you please let me know how I can achieve this?

Well i think CMenu is what you need here, as far as i see it is a hierarchical list, so try:

http://www.yiiframework.com/wiki/295/database-driven-cmenu/