[TYPO3-templavoila] TV Framework: override values of skin_typoescript.ts?

Ron Hall ronslists at busynoggin.com
Fri Sep 10 03:53:05 CEST 2010


Hi Felix,

> I got a step forward in understanding how the framwork works :)
> In this case "conditions" in skin_typoscript.ts are the best practice I guess. Other way I'd have to have in the normal page TS Setup field values like:
> 
> f1a.evaluatedFooter.default.dataWrap = xx
> f1b.evaluatedFooter.default.dataWrap = xx
> f1c.evaluatedFooter.default.dataWrap = xx
> ..
> ..
> f3d.evaluatedFooter.default.dataWrap = xx
> 
> So for EACH framework-template own typoscript. This makes no sense and would create huge pageTS :) Or is there another 'best practice'? I am still learning und trying to understand how everything works :D

You are on the right track. The footer object in the skin is really a default object. Each template will use it unless you target a unique footer for that template.

Meaning if you write a footer object and an f1a.footer template then all templates will get the footer object except theF1a template which will get the f1a.footer. This gives flexibility between templates, but affects overriding the object "downstream" in the page template because of the way each template evaluates whether to use the default footer object or the unique footer object. As you discovered, the actual objects used by each template looks more like f1a.evaluatedFooter, f1b.evaluatedFooter, etc.

Therefore, if you need to override objects at different parts of the page tree you can either , as you noted, write code like:

f1a.evaluatedFooter.default.dataWrap = xx
f1b.evaluatedFooter.default.dataWrap = xx
f1c.evaluatedFooter.default.dataWrap = xx

or you can write a TS conditional in your skin to serve a different default footer object depending on a condition. Most likely you would use a constant to control the condition and then set that constant value in different parts of the page tree. That way you would only need to set one line of code and affect all templates for that branch of the page tree.

Which approach to use would depend on the situation, but I have found that the second approach will use less code for most situations.

Thanks,
Ron Hall

Busy Noggin, Inc.
a web development agency

www.busynoggin.com
templavoila.busynoggin.com

Twitter: busynoggin (general web tweets)
Twitter: typo3ron (for TYPO3 specific tweets)

Facebook: Keep track of Busy Noggin, Inc. by clicking "like" on our Facebook page:
http://www.facebook.com/pages/Busy-Noggin-Inc/114526831896689









On Sep 9, 2010, at 1:57 PM, felix griesser wrote:

> This is not possible
>> footer >
>> footer = TEXT
>> footer {
>> dataWrap =<p>THIS IS DIFFERENT CONTENT</p><!-- end #footer -->
>> }
>> 
> I got a step forward in understanding how the framwork works :)
> In this case "conditions" in skin_typoscript.ts are the best practice I guess. Other way I'd have to have in the normal page TS Setup field values like:
> 
> f1a.evaluatedFooter.default.dataWrap = xx
> f1b.evaluatedFooter.default.dataWrap = xx
> f1c.evaluatedFooter.default.dataWrap = xx
> ..
> ..
> f3d.evaluatedFooter.default.dataWrap = xx
> 
> So for EACH framework-template own typoscript. This makes no sense and would create huge pageTS :) Or is there another 'best practice'? I am still learning und trying to understand how everything works :D
> 
> greetings
> felix
> _______________________________________________
> TYPO3-project-templavoila mailing list
> TYPO3-project-templavoila at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-templavoila
> 



More information about the TYPO3-project-templavoila mailing list