自定义页面上的Joomla模块

I created a component in my Joomla website theme folder, like so:

/templates/rt_afterburner/html/com_content/article

By custom page, I mean an Alternate Layout for an article. I copied the Default.php file and edited it.

Then I created a php file and that is all working correctly.

I am trying to get this "latest news" module from the homepage on my page but I am not sure what I have to call to render this.

<div id="latestnews" class="highlightblock single"><jdoc:include type="modules" name="fp_latestnews" style="xhtml" /></div>

I have tried coping over the module files to where my php file is and included:

$app = JFactory::getApplication(); 

But I can't seem to get this to work.

You could load a module in a layout override file using JModuleHelper/renderModule method.

jimport( 'joomla.application.module.helper' );
$module = JModuleHelper::getModule( 'mainmenu', 'Key Concepts' );
$attribs['style'] = 'xhtml';
echo JModuleHelper::renderModule( $module, $attribs );

Reference: JModuleHelper/renderModule