Re: [T5.1.0.4] Distinguishing Between Internal and Scripts when Combining
On Thu, Jan 21, 2010 at 9:12 PM, Ville Virtanen 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 >> 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-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@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-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
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 > 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-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > ------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@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-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.1.0.4] Distinguishing Between Internal and Scripts when Combining
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 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-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5.1.0.4] Distinguishing Between Internal and Scripts when Combining
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-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org