Re: [jgen] How to influence the order of meta and script tags?

203 views
Skip to first unread message

Rouven Weßling

unread,
Aug 2, 2012, 3:11:26 PM8/2/12
to joomla-de...@googlegroups.com
You could add the script as a custom tag as well.

Rouven

On 02.08.2012, at 15:00, MeBe <push...@gmail.com> wrote:

> Hello,
>
> My joomla (2.5) module contains the following code to add a meta tag and an ajax app to the site:
>
> $doc =& JFactory::getDocument();
> $doc->addCustomTag('<meta name="gwt:property" content="locale=en" />');
> $doc->addScript(JURI::root(true).'/gwt/myapp.nocache.js');
>
> The problem is, addCustomTag() (althoug it is called before addScript) adds the meta tag at the end of the head section (i.e. after the apps script tag), but the ajax app requires the meta tag to be defined before its "<script src..." tag.
> How can I ensure the meta tag appears before the script tag in the output html's header?
>
> Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
> To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/JQyLSHYp9CwJ.
> To post to this group, send an email to joomla-de...@googlegroups.com.
> To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>

MeBe

unread,
Aug 2, 2012, 7:29:43 PM8/2/12
to joomla-de...@googlegroups.com
A way too obvious solution :-)
Thank you very much!


On Thursday, August 2, 2012 9:11:26 PM UTC+2, Rouven Weßling wrote:
You could add the script as a custom tag as well.

Rouven

Reply all
Reply to author
Forward
0 new messages