Instead of :
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<script src="js/bootstrap.min.js"></script>

Try using this
<?php echo $this->Html->css('forms');?>
<?php echo $this->Html->script('bootstrap.min.js');?>

Reference guide :
http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html


2013/5/21 GoBi NaTh <[email protected]>

> iam new one to cakephp, i configured cakephp with twitter bootstrap layout.
>
> I create alert message in index page ,when clicked close button in alert
> it closed.
> when change into another page that page also i create a alert message but
> not works..any one have idea about this reply me..
> i attached sample code also
>
>
> model code:
> *CODE*
> <?php
> class Task extends AppModel
> {
>    var $name = 'Task';
>
> }
> ?>
>
>
>
> Controller code:
> *CODE*
> <?php
> class TasksController extends AppController
> {
>    var $name = 'Tasks';
>    var $components = array('Session');
>    var $helpers = array('Html', 'Form');
>    public function beforeFilter() {
>    parent::beforeFilter();
>    }
>
>    function index()
>    {
>
>    }
>
>    function index1()
>    {
>
>    }
>
>
> }
>
> ?>
>
>
>
> View code:(index.ctp)
> *CODE*
> <html>
> <head>
>
> <meta name="viewport" content="width=device-width, initial-scale=1.0">
> <!-- Bootstrap -->
> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
> </head>
>
> <body>
> </br>
> <?php echo $this->html->link('Click Me', array('action'=>'index1')); ?>
> </br>
> </br>
> </br>
>
>
> <?php
> echo $this->Form->create('Task',array('controller' =>
> 'Tasks','action'=>'index1'));
> echo $this->Form->submit('Click Me',array(' class'=>'btn btn-success ','
> name'=>'commit' ,'type'=>'submit' ,'value'=>'Sign in' ));
> echo $this->Form->end();
> ?>
>
>
>
>    <div class="alert">
>    <button type="button" class="close"
> data-dismiss="alert">&times;</button>
>    <strong>Warning!</strong> Best check yo self, you're not looking too
> good.
>    </div>
>
> <script src="http://code.jquery.com/jquery.js";></script>
> <script src="js/bootstrap.min.js"></script>
> </body>
> </html>
>
>
> Index1.ctp:
>
> *CODE*
> <html>
> <head>
> <title>Bootstrap 101 Template</title>
> <meta name="viewport" content="width=device-width, initial-scale=1.0">
> <!-- Bootstrap -->
> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
> </head>
>
> <body>
>
>
>
>    <div class="alert">
>    <button type="button" class="close"
> data-dismiss="alert">&times;</button>
>    <strong>Warning!</strong> Best check yo self, you're not looking too
> good.
>    </div>
>
> <script src="http://code.jquery.com/jquery.js";></script>
> <script src="js/bootstrap.min.js"></script>
> </body>
> </html>
>
>
>
> give the suggestion to solve this error.
>
> --
> You received this message because you are subscribed to the Google Groups
> "twitter-bootstrap" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"twitter-bootstrap" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to