views:

281

answers:

3

Well, almost all is in the question.

From a newly created module, i would like to be able to inject new meta/script tag which will be added later inside the header when rendered.

I'm pretty it should be a method to do this.

Any ideas ?

A: 

I did this in quiet a naive way: I prepared the page inside joomla administration panel without scripts etc, then, with phpmyadmin I modified the article directly inside the db.

But if I understood your question well you want to modify something that's outside the 'content' part. In that case you could modify the engine part that manages that part of the page and, when a given page is loaded (the article you need to modify meta/script etc...) change those parts

klez
+1  A: 

I found the method to do it. It's a part of the JHTML class.

// Add a reference to a javascript file
// The default path is 'media/system/js/'
JHTML::script($filename, $path, $mootools);

// Add a reference to a CSS file
// The default path is 'media/system/css/'
JHTML::stylesheet($filename, $path);

$document =& JFactory::getDocument();
$document->addScript($url);

Adding JavaScript and CSS to the page

You might also want to look at this response: http://stackoverflow.com/questions/758667/add-page-specific-javascript-or-css-in-joomla/758802#758802
jlleblanc
A: 

http://www.asdsad.com/" />

asdadas