I got a new website which is using Atahualpa 3.6.7 wordpress template. Yesterday, we tried to place an Adsense code in there. It doesn't work. We believed the website were blocked by Adsense. That is not truth! We tried to switched the template, then that works! The solution is simple to use the latest version of Atahualpa, they already fixed this bug!
I have tried to call the json view in the controll, like this:
But that is still with the default html template, even I have used, json_encode.
I have found out I have to put "format=json" in the request url.
I am implementing a MVC component. I wish to pass a value from the controller to the view for displaying. This is very easy. You need to assign the value from the controller.
Then in the view:
That is easy.
Joomla is using the MVC Pattern. There is another feature. You can override display function in controller to trigger whether the controller will display the template. In the following example, I will not display the template when the form is submitted.
I am building a component using JSON in Joomla. That is very hard to do that. So far, I built in a view.json.php in views folder. But I could not call it. Well, that is easy! You just need to add a parameter ,format=json, in the url.