0

let's say my Joomla is deployed in the Root subfolder ,

*root
**Joomla

soo the index.php for Joomla resides in root/Joomla. now I want to render Joomla content through Javascript from the root but not through a redirect, so I want to store the Joomla content into a javascript variable and then render it, is it possible ?

1 Answer 1

0

I suggest you read up on the Joomla Webservices API that allows you to get content from a Joomla website using a restful connection. The website is access via the URL, not folders, therefore your Joomla instance can be in a sub folder, a peer folder or on a different server anywhere on the 'net.

This is a good starter article to read, https://magazine.joomla.org/all-issues/august-2020/joomla-web-services-api-101-tokens,-testing-and-a-taste-test

and there is some limited official documentation here, https://docs.joomla.org/Category:Joomla!_4.x_Web_Services but some searching and you find more helpful information.

In your Javascript you would be using Fetch to pass your request to the website and the content is returned in JSON form that you can process and display however you want.

Your question doesn't say if the content you want from Joomla is the core content or some other extension so what you want may not be available and might require further effort to access.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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