[TYPO3-english] understanding the order of things

Stephan Schuler Stephan.Schuler at netlogix.de
Mon Jul 4 11:34:43 CEST 2011


Hi Katja.


If you look at a single page record in the TYPO3 backend having a single typo script record, then the following order applies:

1. On the tab "Includes", the "Include static (from extensions)" apply in the order they appear in the left column.
2. The "Include basis template" will overwrite the "Include static (from extensions) in the order they appear (except you check the "Include static AFTER basedOn", but you usually don't do this).
3. Then the values from the first "General" will overwrite all former done settings.

Having file based typo script ("<INCLUDE_TYPOSCRIPT: source='someFile'>"), this will be treated as being inline typo script in the first tab "General".

If you have multiple typo script records on a single page record, they will be handled one record at a time. The first record is processed completely (step 1 to 3), then the second record will be processed 1 to 3 and overwrite the first record, and so on.

If you have typo script records on different page levels, they will be processed per page, beginning at the root page. Typo script on the current page will overwrite typo script on parent pages, even if it's extension included stuff.
If you have local setup "lib.foo = 1" on one page and included external templates on the same level that do "lib.foo = 2", the resulting value is "lib.foo = 1" because local setup overwrites included stuff.
If you have local setup "lib.foo = 1" on a parent page (usually the root page) and included templates on the current page that do "lib.foo = 2", the resulting value is "lib.foo = 2" because local templates overwrite parent templates.


That's one of the reasons why I usually avoid to spread my typo script over the page tree: You never keep every location of every single setting in mind. Usually, I have one folder "typo script" that contains several typo script records: One per extension as well as one per non-plugined page task (headline, leftColumnAfterNavigation, searchBar, twoColumnedFce, threeColumnedFce, etc). Additionally, I have a "include template" that includes all others in exactly the order I want them to be processed: plugins at first, followed by non-plugined stuff. If there are a lot of such records, I use a folder structure to organize them: Plugins, libs (mapped locations in the TemplaVoila page template), fces.

If I want to use different typo script on different pages, I always use a condition to make sure both, the original and the page dependent values, are located next to each other.
I maintain a page with 22 page trees and 18 languages, usually three languages per page tree. It would be kind of impossible to handle if the typo script was not very well structured.


Kind regards,



Stephan Schuler
Web-Entwickler

Telefon: +49 (911) 539909 - 0
E-Mail: Stephan.Schuler at netlogix.de
Website: media.netlogix.de


--
netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Andernacher Straße 53 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: info at netlogix.de | Internet: http://www.netlogix.de

netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt



-----Ursprüngliche Nachricht-----
Von: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-bounces at lists.typo3.org] Im Auftrag von Victor Livakovsky
Gesendet: Montag, 4. Juli 2011 10:40
An: typo3-english at lists.typo3.org
Betreff: Re: [TYPO3-english] understanding the order of things

Hi, Katja.

> 1. powermail css: I add default powermail css with template statics
> and if I add my own css rules with my own css file which I want to
> overrule the default ones it seems, the default extension css is
> anyway read after my css file so it's always on "top of the rules". So
> my question here is: can I ensure in anyway my css file is read AFTER the extension css's?
Try to give more weight to your own rules. F.e. if you have your content in some <div id="content">, then place #content before every  your powermail CSS. You may use FireBug and see, which rules are more specific: your ones or powermail's default.

> 2. In - at least now one - extension if I try to change the template
> ts setup in my own ext template, it has no effect. It seems I have to
> make the changes into the extension's own default template. Can this be true?
Not true.
Can you, please, paste your code here?

_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list