[Typo3] simulateStaticDocuments and condition problem

Miko³aj Jêdrzejak mikolajj at typo3.com.pl
Mon Sep 26 01:31:48 CEST 2005


Hi there.
I have a problem with condition.
I have put into main template file two marks ###BUTTON_HOME### and 
###BUTTON_COPYRIGHT###.
Depaenly from the serwer I switch config.simulateStaticDocuments to 0 or 1 
and I would like other things depend on this value.
For example links.

I have 2 templates:
"set-up" and "main template"

in [set-up] i have:
[CONSTANTS]
SiteLinks.home = index.php?id=home
SiteLinks.Shome = home.html
SiteLinks.copyright = index.php?id=copyright
SiteLinks.Scopyright = copyright.html

[SETUP]
config.simulateStaticDocuments = 1 # or 0 sometimes
config.simulateStaticDocuments_noTypeIfNoTitle = 1

in "main template":
[SETUP]
  marks.BUTTON_HOME = TEXT
  [config.simulateStaticDocuments =1]
    marks.BUTTON_HOME.value = {$SiteLinks.home}
  [else]
    marks.BUTTON_HOME.value = {$SiteLinks.Shome}
  [end]

  marks.BUTTON_COPYRIGHT = TEXT
  [config.simulateStaticDocuments =1]
    marks.BUTTON_COPYRIGHT.value = {$SiteLinks.copyright}
  [else]
    marks.BUTTON_COPYRIGHT.value = {$SiteLinks.Scopyright}
  [end]

There is one veryBigMainTemplate where I include  "set-up" and "main 
template" in proper order.
And the condition from let's call it "subtemplates" doesn't work?!?

Does this "Note: Conditions can be used in the global space ONLY!" mean that 
I have to put my condition in my veryBigMainTemplate? It would be rather 
strange, because Template Analizer shows sth like:

---- "set-up"
---- "main template"
veryBigMainTemplate

so first there are stuff from "set-up" then "main template" and finaly from 
veryBigMainTemplate.

Can you explain me what I'm doing wrong?

Best Regards
Mikolaj 





More information about the TYPO3-english mailing list