Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- earth.ctp in full
- <?php $this->layout = 'applayout'; ?>
- <div id="container">
- <div class="col-md-5 col-sm-5 " data-spy="scroll" data-target="#sidebar-nav">
- <?php echo $this->Html->image('earth1.jpg'); ?>
- <h2> Fact File </h2>
- <h3><?php echo $earth['Planet']['planet_name']; ?></h3>
- <p> <?php echo $earth['Planet']['planet_info']; ?></p>
- </div><!-- /.col-xs-12 main -->
- <!-- Text Area col-sm-4 -->
- <div class="col-md-6 col-sm-6 ">
- //planet_content goes here
- </div>
- </div>
- PlanetsController.php in full
- <?php
- class PlanetsController extends AppController
- {
- public $name = 'Planets';
- public $helpers = array('Html', 'Form');
- public function earth() {
- $earth = $this->Planet->find('first', array('conditions' => array('planet_name' => 'Earth')));
- $this->set('earth', $earth);
- }
- public function venus(){}
- public function mercury(){}
- public function mars(){}
- public function saturn(){}
- public function jupiter(){}
- public function uranus(){}
- public function neptune(){}
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement