0

Is is possible to deliver some website parts over json in Joomla 3.6.2? I want to deliver or share header and footer because there are some projects on subdomains but the header and footer should be the same...

I know how to work with json on K2 component but not with parts of website... is there any default Joomla! option?

0

You could do something similar by writing an AJAX plug-in. It is quite quick to write joomla ajax plug-ins and you can set the output to json, or raw. There is good documentation on this at https://docs.joomla.org/Using_Joomla_Ajax_Interface and a handy code example at https://github.com/Joomla-Ajax-Interface/Ajax-Latest-Articles

Another option would be to use something like the JBackend extension, which can output content and other models as json. I mainly use it for mobile app APIs, but it may work ok for what you're looking at too. For more info about jbackend see...

| improve this answer | |
0

There is no option to generate Html as a JSON output.

You have to implement your own API to generate a header or footer from Joomla as a JSON output.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.