You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ville Virtanen <vi...@cerion.fi> on 2010/01/22 06:12:40 UTC

Re: [T5.1.0.4] Distinguishing Between Internal and Scripts when Combining

Hi,

GA works ok for us by just adding it to the tml as is instructed in GA site
- No need to use T5 facilities to include the script. (Done in layout.tml in
our case.)

This doesn't solve the external script problems, and may not work for you
but just thought to let you know.

 - Ville


Kalle Korhonen-2 wrote:
> 
> This seems to be the case with 5.1.0.5 as well - was there any
> resolution for it? Did you ever create an enhancement request?
> 
> Kalle
> 
> 
> On Sun, May 3, 2009 at 3:07 PM, Steve Eynon
> <st...@alienfactory.co.uk> wrote:
>> Hi,
>>
>> If you add a script with an external url then script combining is
>> disabled.
>>
>> From DocumentLinkerImpl :
>>
>> public void addScriptLink(String scriptURL) {
>> ...
>>    // If a script with an external URL is added, we can't combine the
>> scripts after all.
>>    if (combineScripts && !scriptURL.startsWith(fullAssetPrefix))
>>        combineScripts = false;
>> ...
>> }
>>
>> Would it not be possible to have two buckets of scripts, one for
>> internal scripts and the other for external? The internal scripts
>> could then combined into a virtual asset and the external ones
>> rendered as separate script tags.
>>
>> The script combining and virtual assets were working wonderfully until
>> I added script link to Google Analytics on all my pages.
>>
>> renderSupport.addScriptLink("http://www.google-analytics.com/ga.js");
>>
>> I don't want to loose this cool feature of T5 and I would imagine
>> adding Google Analytics to sites (in the manner above) would be a
>> rather common thing to do.
>>
>> Regards,
>>
>> Steve.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/-T5.1.0.4--Distinguishing-Between-Internal-and-Scripts-when-Combining-tp23360860p27268795.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5.1.0.4] Distinguishing Between Internal and Scripts when Combining

Posted by Kalle Korhonen <ka...@gmail.com>.
On Thu, Jan 21, 2010 at 9:12 PM, Ville Virtanen
<vi...@cerion.fi> wrote:
> GA works ok for us by just adding it to the tml as is instructed in GA site
> - No need to use T5 facilities to include the script. (Done in layout.tml in
> our case.)

Yes, for GA that's fine.  But in general, addScriptLink is rather
useful for many purposes.

Kalle



> Kalle Korhonen-2 wrote:
>>
>> This seems to be the case with 5.1.0.5 as well - was there any
>> resolution for it? Did you ever create an enhancement request?
>>
>> Kalle
>>
>>
>> On Sun, May 3, 2009 at 3:07 PM, Steve Eynon
>> <st...@alienfactory.co.uk> wrote:
>>> Hi,
>>>
>>> If you add a script with an external url then script combining is
>>> disabled.
>>>
>>> From DocumentLinkerImpl :
>>>
>>> public void addScriptLink(String scriptURL) {
>>> ...
>>>    // If a script with an external URL is added, we can't combine the
>>> scripts after all.
>>>    if (combineScripts && !scriptURL.startsWith(fullAssetPrefix))
>>>        combineScripts = false;
>>> ...
>>> }
>>>
>>> Would it not be possible to have two buckets of scripts, one for
>>> internal scripts and the other for external? The internal scripts
>>> could then combined into a virtual asset and the external ones
>>> rendered as separate script tags.
>>>
>>> The script combining and virtual assets were working wonderfully until
>>> I added script link to Google Analytics on all my pages.
>>>
>>> renderSupport.addScriptLink("http://www.google-analytics.com/ga.js");
>>>
>>> I don't want to loose this cool feature of T5 and I would imagine
>>> adding Google Analytics to sites (in the manner above) would be a
>>> rather common thing to do.
>>>
>>> Regards,
>>>
>>> Steve.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/-T5.1.0.4--Distinguishing-Between-Internal-and-Scripts-when-Combining-tp23360860p27268795.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org