menu Create करने के लिए सब से पहले bootstrap को add करना होगा
To create a menu, first of all have to add bootstrap
ये code को default में paste करे
Paste this code into default
C:\xampp\htdocs\cakeph\app\View\Layouts
default आप को view layouts में मिल जाएगा
Default you will find in the view layouts
C:\xampp\htdocs\school\app\View\Elements
फिर आप view में elements में menu नाम से एक file बनाये
और ये कोड वहा paste कर दे
Then you create a file in the view named menu with the menu
And paste this code there.
उसके बाद आप उसे default में कॉल कीजिये
After that you call it in default
<?php echo $this->element('menu'); ?>
फिर उसके बाद menu कुछ ऐसा दिखे गा
Then after that the menu will look something like this
To create a menu, first of all have to add bootstrap
echo
$this->Html->script(array(
'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js',
'global'
));
echo
$this->Html->css('//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css');
echo
$this->Html->css('//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-
awesome.min.css');
echo $this->fetch('script');
ये code को default में paste करे
Paste this code into default
C:\xampp\htdocs\cakeph\app\View\Layouts
default आप को view layouts में मिल जाएगा
Default you will find in the view layouts
C:\xampp\htdocs\school\app\View\Elements
फिर आप view में elements में menu नाम से एक file बनाये
और ये कोड वहा paste कर दे
Then you create a file in the view named menu with the menu
And paste this code there.
<nav class="navbar
navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#"></a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="http://localhost/school/teachers/add">TEACHER</a></li>
<li><a href="http://localhost/school/classrooms/add">ClASS</a></li>
<li><a href="http://localhost/school/Exams/add">EXAM</a></li>
<li><a href="http://localhost/school/examresults/add">EXAM RESULT</a></li>
<li><a href="http://localhost/school/examtypes/add">EXAM TYPES</a></li>
<li><a href="http://localhost/school/fees/add">FEES</a></li>
<li><a href="http://localhost/school/students/add">STUDENTS</a></li>
<li><a href="http://localhost/school/subjects/add">SUBJECTS</a></li>
<li><a href="http://localhost/school/attendances/add">ATTENDANCES</a></li>
<li><a href="http://localhost/school/Reports/examresult">REPORTS</a></li>
</ul>
</div>
</nav>
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#"></a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="http://localhost/school/teachers/add">TEACHER</a></li>
<li><a href="http://localhost/school/classrooms/add">ClASS</a></li>
<li><a href="http://localhost/school/Exams/add">EXAM</a></li>
<li><a href="http://localhost/school/examresults/add">EXAM RESULT</a></li>
<li><a href="http://localhost/school/examtypes/add">EXAM TYPES</a></li>
<li><a href="http://localhost/school/fees/add">FEES</a></li>
<li><a href="http://localhost/school/students/add">STUDENTS</a></li>
<li><a href="http://localhost/school/subjects/add">SUBJECTS</a></li>
<li><a href="http://localhost/school/attendances/add">ATTENDANCES</a></li>
<li><a href="http://localhost/school/Reports/examresult">REPORTS</a></li>
</ul>
</div>
</nav>
उसके बाद आप उसे default में कॉल कीजिये
After that you call it in default
<?php echo $this->element('menu'); ?>
फिर उसके बाद menu कुछ ऐसा दिखे गा
Then after that the menu will look something like this
No comments:
Post a Comment