Feature #30023
Split static TypoScript
| Status: | Resolved | Start date: | 2011-09-19 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Francois Suter | % Done: | 100% |
|
| Category: | Configuration Parameters | |||
| Target version: | 3.0.0 | |||
| Votes: | 0 |
Description
The current static TS file includes all configuration options, plus code for activating the plugin, i.e. that part:
page {
jsFooterInline {
200 = USER_INT
200.userFunc = tx_rsgoogleanalytics->processTrackingCode
}
includeJSFooterlibs {
rsgoogleanalytics = http://www.google-analytics.com/ga.js
rsgoogleanalytics.external = 1
}
}
[globalString = _SERVER|HTTPS=on]
page.includeJSlibs.rsgoogleanalytics = https://ssl.google-analytics.com/ga.js
[global]
I think that it is not desirable for that second part to be loaded all the time, since the PAGE object may not be called "page", people might want the code to be in the header and not the footer (as per the latest Google recommendations). Furthermore when using the asynchronous method, the ga.js should not be fetched using includeJSlibs.
As such I propose to split the TS into 2 files, or even 3: one for the general setup, one for traditional inclusion method and one for asynchronous inclusion method.
Associated revisions
Move static TS to a sub-folder, references #30023
Move static TS to a sub-folder, references #30023
Split configuration and activation TS code
Provided different activation TS for the different inclusion methods
references #30023
Split configuration and activation TS code
Provided different activation TS for the different inclusion methods
references #30023
Restore old TS setup (marked as legacy) to ensure backwards-compatibility upon upgrade to v2, references #30023
Restore old TS setup (marked as legacy) to ensure backwards-compatibility upon upgrade to v2, references #30023
History
Updated by Francois Suter over 1 year ago
One more thing: the script is called using a USER_INT object which is not desirable, because it may prevent caching depending on the type of cache used (for example, static file cache). It is sometimes necessary to use a USER_INT object (for example, for a page with e-commerce stuff), but in most cases a USER object will do. I would suggest to change the type to USER and write a note in the (eventual) manual about the choice of USER/USER_INT object.
Updated by Francois Suter over 1 year ago
- Target version set to 3.0.0
Updated by Francois Suter about 1 year ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset r60350.