How to make an <ul>

Hi

Once more, my doubts are from a newbie.

How can I create a list like a <ul>. Is there any helper using chtml?

I don’t want to make a menu, nor a table.

I just want to make a simple <ul> with <li> inside with some of them having another <ul> inside. Something like this:




  <ul id="abc">

    <li>Text 1

      <ul>

        <li><a href="some link">some text</li>

        <li><a href="some link">some text</li>

        <li><a href="some link">some text</li>

        <li><a href="some link">some text</li>

      </ul>

    </li>

    <li><a href="some link">some text</li>

    <li><a href="some link">some text</li>

    <li><a href="some link">some text</li>

  </ul>



Is there some way of doing this "a la" Yii, or the only way is just put straight html?

I am looking at Yii documentation for over an hour, but I’m stuck.

TIA

I don’t believe is something Yii-sh to create this.

Just use plain old HTML, i see nothing wrong in doing so.

Ok, thank you again, twisted…

For a newbie, it is hard to find out all that a framework so rich like Yii can do. :)

Try to keep things simple.

Usually, Yii has ways to generate menus/breadcrumbs or to let you create forms/form elements but when it makes more sense to use plain html, go with that.

To add to twisted’s comments:

Take a look at the layout/main.php file, In the <head> section, how they impliment the ‘css’ links. It’s all stratight up html, except the the little <?php echo Yii:: … ?> stuff.

How ever to answer your original question about the <ul><li>…</li></ul> From the CHtml doc




listBox()        Generates a list box. CHtml 

listData()       Generates the data suitable for list-based HTML elements. CHtml 

listOptions()    Generates the list options. CHtml 



There also is an CHtml::openTag()/closeTag(), and the CHtml:tag().