How i set the my plugin html in body in joomla

456 Views Asked by At

I want to set my plugin HTML in body tag in joomla. below my code

$doc =& JFactory::getDocument();

$doc->addStyleSheet(JURI::BASE().'plugins/system/-------/css/abc.css');
$doc->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', 'text/javascript');
$doc->addScript(JURI::BASE().'plugins/system/--------/js/bjqs-1.3.min.js', 'text/javascript');
$doc->addScript(JURI::BASE().'plugins/system/-----/js/abc.js', 'text/javascript');

$body  = '<div class="landin_main">';
$body .= '<div class="logo"><img src="'.JURI::BASE().'plugins/system/landingpage/images/logo.png" /></div>';
$body .= '<div class="slider">';
    $body .= '<div id="banner-slide">'; 
        $body .= '<ul class="bjqs">';
        $body .= '<li><img src="'.JURI::BASE().'plugins/system/---/images/1.png" /></li>';
        $body .= '<li><img src="'.JURI::BASE().'plugins/system/---/images/2.png" /></li>';
        $body .= '<li><img src="'.JURI::BASE().'plugins/system/---/images/3.png" /></li>';
        $body .= '</ul>';
    $body .= '</div>';
$body .= '</div>';
$body .= '<div class="skip"><a href="#"><img src="'.JURI::BASE().'plugins/system/-----/images/skip.png" /></a></div>';
$body .= '<div class="clear"></div>';
$body .= '</div>';
print_r($body);

when I print this HTML and check on firebug, all the script and link tags get appended inside the body tag below my HTML. Now I want to show all the HTML in body tag and script and links in Head tag. I have used onAfterInitialise event in plugin.

0

There are 0 best solutions below