[TYPO3] Selected content wrap
Tyler Kraft
headhunterxiii at yahoo.ca
Fri Oct 26 17:15:49 CEST 2007
Hi
well first thing you need to do is change the way the content is
rendered. currently the content is rendered the saem across the columns
- if its a text w/image content type it doesn't matter what column its
in it gets rendered the same way. You need to change that so each column
renders things independently
# renedring definitions ona per column basis
temp.customRender = CASE
temp.customRender {
key.field = colPos
default < tt_content
0 < tt_content
1 < tt_content
2 < tt_content
3 < tt_content
}
tt_content >
tt_content < temp.customRender
tt_content{
default.textpic.20.text.20 = < tt_content.default.text.20
0.textpic.20.text.20 = < tt_content.0.text.20
1.textpic.20.text.20 = < tt_content.1.text.20
2.textpic.20.text.20 = < tt_content.2.text.20
3.textpic.20.text.20 = < tt_content.3.text.20
default.textpic.20 = < tt_content.default.image.20
0.textpic.20 = < tt_content.0.image.20
1.textpic.20 = < tt_content.1.image.20
2.textpic.20 = < tt_content.2.image.20
3.textpic.20 = < tt_content.3.image.20
}
Then if you want to apply just a wrap to each content item in the border
column its as simple as determining a few things first - do you want
your wrap to enclose the back to top link if they check that option? If
yes then
tt_content.3.innerWrap2 = <div class="bordercontent">|<p><a
href="#pagetop">Back to top</a></p></div>
If no then
tt_content.3.innerWrap2 = <div class="bordercontent">|</div><p><a
href="#pagetop">Back to top</a></p>
Likewise if you are making use of the content frame selector then you
might instead use the tt_content.3.innerWrap
But then you can make your own custom header definition and apply it to
all items in the border column simply like this:
lib.stdheaderNEW < lib.stdheader
lib.stdheaderNEW.10.1.fontTag = <div class="header">|</div>
tt_content.3{
header.10 =< lib.stdheaderNEW
image.10 =< lib.stdheaderNEW
text.10 = < lib.stdheaderNEW
textpic.10 =< lib.stdheaderNEW
textpic.20.text.10.10 =< lib.stdheaderNEW
html.10 =< lib.stdheaderNEW
menu.10 =< lib.stdheaderNEW
bullets.10 =< lib.stdheaderNEW
table.10 =< lib.stdheaderNEW
uploads.10 =< lib.stdheaderNEW
multimedia.10 =< lib.stdheaderNEW
mailform.10 =< lib.stdheaderNEW
search.10 =< lib.stdheaderNEW
login.10 =< lib.stdheaderNEW
splash.10 =< lib.stdheaderNEW
shortcut.10 =< lib.stdheaderNEW
list.10 =< lib.stdheaderNEW
script.10 =< lib.stdheaderNEW
div.10 =< lib.stdheaderNEW
default.10 =< lib.stdheaderNEW
}
hth
Pasquale Basile wrote:
> Thanks Tyler,
> I made several search but found no useful references . After some
> investigation, I found the following solutions to my questions:
>
> 1) wrapping a selected content can be achieved using the following TS code:
> ..renderObj.stdWrap.wrap = <div class"contentwrap"> | </div>
>
> 2) Modifying the header only of the selected content if more complex.
> I resolved with code like this
>
> lib.MyHeader < lib.stdheader
> lib.MyHeader.10.1.fontTag = <div class="header">|</div>
>
> and, after, modifying each occurence of desided content (in the sample
> I modified for text, all other plugins, image, textpic).
>
> 10.renderObj.text.10 = < lib.MyHeader
> 10.renderObj.list.10 = < lib.MyHeader
> 10.renderObj.image.10 = < lib.MyHeader
> 10.renderObj.textpic.10.10 = < lib.MyHeader
> 10.renderObj.textpic.20.text.10 = < lib.MyHeader
>
> With this solution the header of the non-selected content remains unchanged.
>
> with "selected content" I mean the records selected from tt_content
> using some conditions, like
> styles.content.getBorder
>
> I hope to write a more detailed article in the near future on this argument.
> Pasquale
> http://www.sublogic.org
>
>
>
>> Hi and welcome,
>>
>> Do a search of this list for custom content column rendering - there are
>> tons of mailings about how to do what you want
>
>> hth
>
>
>
> Pasquale Basile wrote:
>> Hi,
>> this is the first post on this ML.
>> My goal is to wrap a selected content (i.e. each single border
>> content) in a similar way:
>> <div class="bordercontent"><<content>></div>
>> and, moreover, to render the header in a more complex way:
>> <div class="borderheader">...otherstuff <<header>> </div>
>>
>> For the last action, after some research, I found some solution acting
>> on lib.stdheader; but modifying lib.stdheader I think that ALL the
>> content is involved, isn't ?
>> I, instead, with to limit this action only to the content resulting from
>> styles.content.getBorder
>> TS code.
>> Any suggestion?
>> Thanks,
>> Pasquale Basile
>> http://www.sublogic.org
More information about the TYPO3-english
mailing list