[TYPO3-english] Rendering shortcuts
Paul Johnson
paul at studioe9.com
Fri Nov 20 18:41:59 CET 2009
Thanks Tomas... I think I am almost there... I hope.
Yes, I am trying to set it up so an image inserted in a page using
"insert records" will render exactly as an image place on that page
(locally)...
I managed to customize the rendering of images on the page, I just
want the shortcuts to follow the same parameters.
I am pasting my full code below including how I adapted your example.
I am new to typoscript, but I think this must be pretty close to
working...?
temp.examplelist=CONTENT
temp.examplelist{
table=tt_content
wrap=|
select{
selectFields= image,imagecaption,image_link,ctype,bodytext
where=colPos=2
}
renderObj = COA
renderObj.wrap = <div id="examplebox" >|</div>
renderObj {
1 = TEXT
1 {
if.value = image
if.equals.field = ctype
required=1
field=image_link
wrap=<div id="exampleimage"><a href="|">
}
2 = TEXT
2 {
if.value = image
if.equals.field = ctype
required=1
field=image
wrap=<img src="http://example.org/uploads/pics/|" alt="" border="0" /
></a>
}
3 = TEXT
3 {
if.value = image
if.equals.field = ctype
required=1
field=imagecaption
wrap=<div id="exampledesc">|</div></div>
}
4 = TEXT
4 {
if.value = html
if.equals.field = ctype
required=1
field=bodytext
}
5 = CASE
5 {
key.field = CType
shortcut = RECORDS
shortcut {
source.field = records
tables = tt_content
conf {
tt_content < tt_content
tt_content.image >
tt_content.image = TEXT
tt_content.image.value = TEST
}
}
}
}
}
On Nov 20, 2009, at 11:29 AM, Tomas Mrozek wrote:
>> Could you give a quick example how I would, for example, access and
>> wrap
>> an image field from the shortcut record in the below, then I
>> should be
>> all set ?
>
> It depends on which tt_content type you want to set it for. The
> content
> "Insert records" includes tt_content records which again are of
> certain
> type... including "Insert records". Confused?! :-)
>
> With the previous code,
> temp.shortlist.renderObj.5.shortcut.conf.tt_content is the same as
> tt_content so use TypoScript Object browser to explore the current
> settings and do changes.
>
> For example, with
> temp.shortlist.renderObj.5.shortcut.conf.tt_content.image you can
> change
> all "Image" tt_content elements that you refer to in the "Insert
> records" (shortcut) element. You can obviously completely redefine
> them,
> thus...
>
> temp.shortlist.renderObj.5.shortcut.conf.tt_content.image >
> temp.shortlist.renderObj.5.shortcut.conf.tt_content.image = TEXT
> temp.shortlist.renderObj.5.shortcut.conf.tt_content.image.value = TEST
>
> ...should render text "TEST" instead of each "Image" that you are
> referring to with your "Insert records" element.
>
> Tomas Mrozek
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
StudioE9, Media + Design + Technology
108 Leonard St, 13th Fl, NYC,10013
Web. http://www.studioe9.com
Blog. http://www.networke9.com
More information about the TYPO3-english
mailing list