cdub
cdub

Reputation: 25751

Cakephp URL Parameters

I have a Cakephp 2.1 app.

My function is declared:

public function ajaxOfferingDelete($descipline_name = -1, $field_id = -1)
{
    $this->layout = 'empty';

    //output code
    echo 'hello';
}

Enter this into the URL works fine:

localhost/lessonshark/teachers/ajaxOfferingDelete/

The above outputs hello but the bottom gives me nothing:

 localhost/lessonshark/teachers/ajaxOfferingDelete/1/137

Why is this happening? It was working before.

Upvotes: 0

Views: 506

Answers (1)

user1548335
user1548335

Reputation:

Have you created 'empty' layout? If you did, you must have in it:

<?php echo $this->fetch('content'); ?>

Upvotes: 1

Related Questions