简体   繁体   中英

How to change/Overriding Gii result when use Yii Framework without have to change Yii Core

How do I make a replacement result html tag when using Gii without having to change the yii core direct itself to change the outcome ???

Gii By default : framework\\gii\\generators\\crud\\templates\\default

and result :

<div class="row">
    <?php echo $form->labelEx($model,'title'); ?>
    <?php echo $form->textField($model,'title'); ?>
    <?php echo $form->error($model,'title'); ?>
</div>

But if I want to get HTML Tag like :

<table>
    <tr>
        <td><?php echo $form->labelEx($model,'title'); ?></td>
        <td>:</td>
        <td><?php echo $form->textField($model,'title'); ?></td>
        <td><?php echo $form->error($model,'title'); ?></td>
    </tr>
</table>

Or in any other form appropriate style css and html that I have.

What should I do to get the results of Gii code generated like that?

The The Definitive Guide to Yii has an manual on extending Gii. You can find it here: http://www.yiiframework.com/doc/guide/1.1/en/topics.gii#extending-gii

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM