[TYPO3] Customizing templates

Christopher Torgalson bedlamhotel at gmail.com
Wed Apr 11 16:54:23 CEST 2007


Hi,

On 4/11/07, tonix (Antonio Nati) <tonix at interazioni.it> wrote:
> At 17.03 09/04/2007, Andrew Davis wrote:
> >you could ebable/disable the printable page link using conditions in
> >your template, that way you will only need one.
> >
> >look for conditions in the newsgroup for more help
>
> I'm serching massively in manuals, but I cannot find a very basic
> example about:
>
> - definition of a variable, like
>          PagePrint.enable = 1
> inside TS config of the page. Is this enough or there is other to add?
>
> - usage of that variable inside a condition within the template setup:
>          [PagePrint.enable = 1]
>          ....
>          [end]
> I feel this is not enough, but I cannot guess what other params I
> have to add in order to have it working.


More reading is in order. A couple of things stand out in your message:

1. TS and TSconfig are different. If you are really putting things
like this in TSconfig field, you should know that, even if the code
above was correct--it isn't--it would never work if you put it in that
location.

2. YOU CANNOT SIMPLY INVENT TS AND EXPECT IT TO WORK. Sorry for
shouting, but as far as I am aware, there is not and never has been
any such thing as "PagePrint.enable." What did you expect to happen?
How did you expect the system to interpret an arbitrary value? TYPO3
is a CMS, not an AI...

TS conditions in general work like this:

# Set some condition
[some condition]
# Do some typoscript--usually a variation on some TS found elsewhere
in the site/template; for a printable page, this might mean switching
a stylesheet etc...
# Return to global scope:
[global]


I would recommend that you:

1. Re-read the TSref section on conditions
2. Read about how to actually /use/ the TSref effectively (doesn't
cover conditions, but should help you understand why you can't just
invent TS properties and how to find a function, property or object
that does what you need it to do) [1]
3. Search to see how others have built printable pages [2]
4. Decide HOW you intend to create the print page in the first place
(i.e. build the TS that renders the page differently)
5. Decide what condition must be satisfied to show a printable view
(choose from among the conditions in the TSref--is it a GET paramater
in the URL? a particular page id? a particular page type?)



-- 
Christopher Torgalson
http://www.typo3apprentice.com/

[1] http://www.typo3apprentice.com/howto/rtfm/
[2] http://www.google.com/search?q=typo3+printable+page&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a


More information about the TYPO3-english mailing list