Joomla 4 Display external MySQL table in Article Topic is solved

Be informed that this forum is not an official support forum for Joomla! 4.0. Any issues regarding Joomla! 4.0 must be reported at https://issues.joomla.org/.

Joomla 4.0 is still in Beta stage. This forum should be used for sharing information about Joomla! 4.0.

Moderator: ooffick

Forum rules
Locked
denburydays
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun May 09, 2021 10:10 am

Joomla 4 Display external MySQL table in Article

Post by denburydays » Fri Sep 17, 2021 10:30 am

Attempting to connect and display within an A ??? rticle an external mysql table. This was achieved successfully in Joomla 3 by creating a 'Wrapper' Module then using 'Advanced Module Manager' to display it within Article (via SP Page Builder). This worked fine in Joomla 3 but now I cannot do this in Joomla 4. Have tried all sorts of methods without success. The 'Wrapper' Module in Joomla 4 only basic 'stuff'
Can someone suggest a method in Joomla 4.

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 24984
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Joomla 4 Display external MySQL table in Article

Post by pe7er » Sat Sep 18, 2021 6:34 am

Welcome to Joomla forum!

Maybe you could create a simple Joomla 4 Module:
https://docs.joomla.org/Special:MyLangu ... ple_Module

In Joomla 3 you can display a module in an article. I suppose that you can do something similar in Joomla 4. I don't use SP Pagebuilder and do not know if it supports this Joomla core functionality of displaying a module in an article.
https://docs.joomla.org/How_do_you_put_ ... article%3F
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2674
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Joomla 4 Display external MySQL table in Article

Post by ceford » Sat Sep 18, 2021 8:34 am

Your question needs clarification. What exactly do you mean by external MySQL table? Are you trying to display the content of a table from your own site database? Or are you fetching content from a remote MySQL database? Or just content from a remote site? The Wrapper menu item and the Wrapper module both create an Iframe - you need to configure one or other with the remote url. The module can be included in an article (although I have not used this particular module so can't confirm it works).

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30926
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Joomla 4 Display external MySQL table in Article

Post by Per Yngve Berg » Sat Sep 18, 2021 8:36 am

Cannot you use Custom Fields that have been available since 3.9?

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2674
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Joomla 4 Display external MySQL table in Article

Post by ceford » Sat Sep 18, 2021 8:49 am

I tried out the wrapper module and can confirm it works fine. In the module, set a url and some other suitable parameters such as height. Type in a name for the module position, example: inhouse

Then in your article place the call where you want the wrapper to appear like this:

<div>{loadposition inhouse}</div>

denburydays
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun May 09, 2021 10:10 am

Re: Joomla 4 Display external MySQL table in Article

Post by denburydays » Sat Sep 18, 2021 10:00 am

Per Yngve Berg wrote:
Sat Sep 18, 2021 8:36 am
Cannot you use Custom Fields that have been available since 3.9?
Thanks - I can successfully in Joomla 3 but not Joomla 4

denburydays
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun May 09, 2021 10:10 am

Re: Joomla 4 Display external MySQL table in Article

Post by denburydays » Sun Sep 19, 2021 8:51 am

Thanks for everyones help and advise. I finally solved the problem by completely uninstalling Joomla 4 then reinstalling (Joomla 4.03). This seems to have solved my problem.


Locked

Return to “Joomla! 4 Related”