Ajax template error


#1

In the code below, render works for get but not put:

public function ajaxEdit($id = null,$update_field = null)
{
    if($this->request->is('ajax'))
    {
        $this->viewBuilder()->layout('ajax');
        $this->set('_serialize',false);
        $window = $this->ResidentialGlassCleaningLineItems->get($id);
        if($this->request->is('get'))
        {
            $this->set('record_id',$id);
            $this->set('update_field',$update_field);
            $this->set('window',$window);
            $this->render('ResidentialWindowCleaning./Element/ResidentialWindows/edit-form');
        }
        
        if($this->request->is('put','post'))
        {
           if($this->ResidentialGlassCleaningLineItems->updateEntity($id, $this->request->data['update_field'], $this->request->data['base_price']))
           {
               $window = $this->ResidentialGlassCleaningLineItems->get($id);
               $this->set('window',$window);
               $this->render('ResidentialWindowCleaning./Element/ResidentialWindows/price-detail');
           }  
        }
    }
}

I am getting a ‘Missing Template’ error when the put operation completes and goes to render. Any ideas?


#2

why there is a dot before /?


#3

Hello jaynarayan;
The dot is a syntactic idiom. It identifies the separation of the plugin name from the paths specified to access the plugin folder structure.

The / places the path at the top of the View folder, and specifies the Element folder as the starting point to the path.