0

I have a Joomla article and I need to implement "@include ...." in the article source code, so it loads a PHP page from external link, but only this article should display the PHP page.

I searched in Admin panel, navigated to that article, but the editor says that the article source code is empty.

Any solutions ?

thanks

1
  • So you're loading via an iframe? Ajax? The notion of editing "source code" runs counter to the whole point of a CMS.
    – isherwood
    Mar 10, 2015 at 15:53

1 Answer 1

2

You can not include PHP code in articles. But there are extensions that will help you to achieve it, for example Sorcerer.

Once installed, you can add your PHP code into your article like so:

{source}
  <?php
      include PATH_TO_FILE.php
  ?>
{/source}
2
  • great , Dmitry , I am wondering if I can avoid that and route the article body to a PHP page , because the external PHP page is going to be the entire article
    – Mike s
    Mar 6, 2015 at 10:30
  • I am not sure that this is possible. May be create a menu link to the external PHP script (link). Not clear what exactly you want to achieve? May be it you can update your question or ask a new one? Mar 6, 2015 at 15:32

Your Answer

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

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