Jump to content

Cakephp doesn't display what's in $this...

Hello everybody, 

 

I'm making a contact page on my site and to do so i'm following this tutorial : https://www.youtube.com/watch?v=1pFw3lLt4Ks

I'm not starting from a fresh install because that's not my only page... 
 

My issue is that in my index.ctp the $this->whatever doesn't display anything... But if i write pure text it works... 

Can you help me to fix it ? 

here's the code :

 

ContactController.php

<?php class ContactController extends AppController{	public function Index() {		}}

Contact.php
 

<?php class Contact extends AppModel{public $useTable = false;}?>

Index.ctp
 

<?php $this->set('title_for_layout', "Pour me contacter"); ?><?php $this->Form->create('Contact'); ?>    <?php $this->Form->input('name', array('label'=>"votre nom")); ?><?php $this->Form->end('Envoyer'); ?>


By the way I'm kind of noobish with cakephp :/

GPU : R9 290 Proc : AMD Phenom II X4 955 (3.6 Ghz) Mobo : ASrock 970 extreme 3 PSU : corsair GS 700 HDD : 1250Go SSD : vertex 4 128 Go Case : Fractal Design Define S RAM : 8Go Fan : CM Hyper 212 evo Headset : Steelseries Siberia V2  Mouse : Roccat Savu Keyboard : CMstorm quickfire TK Screen : LG flatron E2240s + Acer Predator 144Hz/Freesync

Link to comment
https://linustechtips.com/topic/259308-cakephp-doesnt-display-whats-in-this/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×