dstew32424 2014-06-18 10:42
浏览 63

如何将bootstrap主题转换为yii-bootstrap扩展?

Recently, I've started using the Yii framework to develop a personal website. I would love to use some of the bootstrap themes that have already been implemented; however, I'm having difficulty finding a way to convert these themes to the yii framework.

Is there any way to download a bootstrap theme and then convert it to the yii framework? What are the basic steps I should take? (or, better) Is there any converter out there that does this automatically?

  • 写回答

1条回答 默认 最新

  • dongtidai6519 2014-06-20 09:40
    关注

    Download Bootstrap ..

    Then create move it to project_name/themes and rename it to bootstrap

    edit this protected/config/main.php and add this line :

    'theme' => 'bootstrap',
    

    Like:

    'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    'name'=>'My Web Application',
    'theme' => 'bootstrap', 
    

    to call the script or the styles use the theme request url, like:

    Script:

    <script src="<?php echo Yii::app()->theme->baseUrl;?>/js/boostrap.js">
    

    Style:

    <link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl;?>/css/boostrap.css">
    

    This can be use on other themes.

    Cheers!

    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记