-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not using the subdirectory for view file #3
Comments
As the code shows that would not work. You would need to set it to empty string |
There is even a test for it :) https://github.com/dereuromark/cakephp-ajax/blob/master/tests/TestCase/View/AjaxViewTest.php#L117 |
Thank you for the update. Sorry,if I misunderstand anything but setting it to '' or false did not work for me initially. and after checking the test, I came to know setting it to false might work. So, finally making the change as I specified above did work for me : Please correct me if I am wrong anywhere. I accept my knowledge with this is very limited and I am not aware about all the related parts of the framework. |
So in your case you still have the problem? |
No, my problem is solved after the above change. My view is in _src\Template\CONTROLLER_NAME_ directory. and working. There is not much code yet. I am yet to put everything as per my requirement.
|
The idea is that you have not to change the source code here.
in your controller action, which you do not do yet it seems. |
I had tried that before making change in source code but it didn't work. |
Can you try to make it work without changing the source code? if nothing works, then we have to find a solution. |
I did try a couple of things but failed. I am a novice with this so. |
No luck :( no options. |
Please check if 3.1 (and the current head of this plugin) fixes the issue. With
|
Should be good now. |
Mark,
I am using this plugin in my app and I needed to skip the subdirectory for view file like this src\Template\ajax\ACTION_NAME.ctp as I am using a new controller for ajax requests.
So, I changed the code here https://github.com/dereuromark/cakephp-ajax/blob/master/src/View/AjaxView.php#L68-L70 and set it to -
$this->subDir = null;
Now, I am not sure if this make a good feature and if yes, how to make this option configurable so that it can be put in the repository. What are you comments on it?
The text was updated successfully, but these errors were encountered: