[TYPO3] CASE for page records
Tapio Markula
tapio.markula at xetpoint.fi
Mon May 26 19:08:45 CEST 2008
Tapio Markula kirjoitti:
> Christopher Torgalson kirjoitti:
>> Hi,
>>
>> On Mon, May 26, 2008 at 11:52 AM, Tapio Markula
>> <tapio.markula at xetpoint.fi> wrote:
>>> Hi
>>>
>>> CASE-structure is for tt_content record. Is there a way to create
>>> resembling for 'pages' table?
>>>
>>> I would need that for different BODY tags depending on value in a field
>>> (defined in an extension) of pages table
>>>
>>> isTrue/isFalse or equals can't be used because I have three different
>>> values and the value always exists.
>>
>>
>> Check your last week's thread on this subject. I pasted a working CASE
>> object that uses the pages table.
>>
>
> yes I found it from ('[TYPO3] Problem with BODY tägs') and it was usable
Found that it doesn't work
I tried this
page.bodyTag >
page.bodyTagCObject = CASE
page.bodyTagCObject {
key.field=backgroundcolor
18161b=TEXT
18161b {
stdWrap.dataWrap(
<body id="page{field:uid}" bgcolor="#{field:backgroundcolor}"
class="color_{field:backgroundcolor}">
<style type="text/css">
#yläteksti a:link, #yläteksti a:visited, #yläteksti a:hover { color:
white; }
</style>
<!--DMAILER_SECTION_BOUNDARY_-->
<table width="623" id="ylateksti" border="0" cellspacing="0"
cellpadding="0" align="center"
style="background-color:#{field:backgroundcolor}" class="|"><tr><td
height="30" align="center" valign="top" class="pikkuteksti style2"
style="color:white;padding:3px;">Voit lukea kirjeen myös
osoitteessa: <a style="color:white !important"
href="http://www.virginoil.fi/index.php?id={field:uid}">www.virginoil.fi/index.php?id={field:uid}</a>.</td></tr></table>
<center style="background-color:#{field:backgroundcolor};"
class="color_{field:backgroundcolor}">
)
}
dcc194=TEXT
dcc194 {
stdWrap.dataWrap(
<body id="page{field:uid}" bgcolor="#{field:backgroundcolor}"
class="color_{field:backgroundcolor}">
<style type="text/css">
#yläteksti a:link, #yläteksti a:visited, #yläteksti a:hover { color:
black; }
</style>
<!--DMAILER_SECTION_BOUNDARY_-->
<table width="623" id="ylateksti" border="0" cellspacing="0"
cellpadding="0" align="center"
style="background-color:#{field:backgroundcolor}" class="|"><tr><td
height="30" align="center" valign="top" class="pikkuteksti style2"
style="color:black;padding:3px;">Voit lukea kirjeen myös
osoitteessa: <a style="color:black !important"
href="http://www.virginoil.fi/index.php?id={field:uid}">www.virginoil.fi/index.php?id={field:uid}</a>.</td></tr></table>
<center style="background-color:#{field:backgroundcolor};"
class="color_{field:backgroundcolor}">
)
}
b8c2c4=TEXT
b8c2c4 {
stdWrap.dataWrap(
<body id="page{field:uid}" bgcolor="#{field:backgroundcolor}"
class="color_{field:backgroundcolor}">
<style type="text/css">
#yläteksti a:link, #yläteksti a:visited, #yläteksti a:hover { color:
black; }
</style>
<!--DMAILER_SECTION_BOUNDARY_-->
<table width="623" id="ylateksti" border="0" cellspacing="0"
cellpadding="0" align="center"
style="background-color:#{field:backgroundcolor}" class="|"><tr><td
height="30" align="center" valign="top" class="pikkuteksti style2"
style="color:black;padding:3px;">Voit lukea kirjeen myös
osoitteessa: <a style="color:black !important"
href="index.php?id={field:uid}">www.virginoil.fi/index.php?id={field:uid}</a>.</td></tr></table>
<center style="background-color:#{field:backgroundcolor};"
class="color_{field:backgroundcolor}">
)
default=TEXT
default {
stdWrap.dataWrap(
<body id="page{field:uid}" bgcolor="#{field:backgroundcolor}"
class="color_{field:backgroundcolor}">
<style type="text/css">
#yläteksti a:link, #yläteksti a:visited, #yläteksti a:hover { color:
black; }
</style>
<!--DMAILER_SECTION_BOUNDARY_-->
<table width="623" id="ylateksti" border="0" cellspacing="0"
cellpadding="0" align="center"
style="background-color:#{field:backgroundcolor}" class="|"><tr><td
height="30" align="center" valign="top" class="pikkuteksti style2"
style="color:black;padding:3px;">Voit lukea kirjeen myös
osoitteessa: <a style="black:white !important"
href="index.php?id={field:uid}">www.virginoil.fi/index.php?id={field:uid}</a>.</td></tr></table>
<center style="background-color:#{field:backgroundcolor};"
class="color_{field:backgroundcolor}">
)
}
}
Well the BODY tag and related code was ok - *but* after the body tag
content areas were not replaced and the html template didn't work.
More information about the TYPO3-english
mailing list