[TYPO3-english] insert record -> hide or delete header, h1 etc
Jigal van Hemert
jigal at xs4all.nl
Sat Jul 18 00:44:02 CEST 2009
Hi Robert,
Robert Wildling wrote:
> These chgallery objects a incorporated into several site via "insert
> records". The marker in the template looks like this:
>
> parts.10.subparts.PICS < styles.content.getBorder
>
> The problem now is that the title is shown.
If you use Web > Template, navigate to the page and use the Typoscript
Object Browser you will see in page.10.subparts.PICS something like:
[PICS] = COA
[-] --- [10] = CONTENT
+--[table] = tt_content
[-]-[select]
+-- [orderBy] = sorting
+-- [where] = colPos=3
+-- [languageField] = sys_language_uid
In TSRef you can lookup all properties of CONTENT [see: 1]. Apart from
the ones set in TS (table, select) you'll find renderObj, which
determines how these records are rendered. renderObj defaults to
<tablename>, so we'll have to search under tt_content in TS to see the
render method.
Indeed there is a [tt_content] in the TS root! It's a CASE object which
uses the CType field as key (tt_content.key.field = CType). If you
lookup the CType field of your chgallery objects it'll probably be
"list". Let's see:
[tt_content]
|
[-] -- [list] = COA
| +-- [10] = < lib.stdheader
| [-]-- [20] = CASE
| [+]-- [2] = CASE
and further down you should probably find something like:
| +-- [ch_gallery] = < plugin.tx_chgallery_pi1
Below the 'list' part you see that the first subpart is:
10 = < lib.stdheader
This renders the title.
20 = CASE
and all the rest renders the actual content for all kinds of content
elements.
This explains how the title appears above your content element. Now how
to let is disappear?
* easiest: set the 'type' field in the 'Header' part of your content
element (in the Page module) to "Hidden". The title will still be
visible in the Page and List module, but it will not be rendered on the
webpage. But this is not in TS :-)
* define your own renderObj for tt_content elements. You could copy the
default from the [tt_content] element and modify the
10 = < lib.stdheader
line; this would influence all 'list' CTypes though.
* modify tt_content.list.10 (which is responsible for the title/header)
and make it a CASE with key.field=list_type. Do not render anything for
list_type "ch_gallery" and make a reference to lib.stdheader as default.
tt_content.list.10 >
tt_content.list.10 = CASE
tt_content.list.10 {
key.field = list_type
ch_gallery = TEXT
ch_gallery.value =
default = < lib.stdheader
}
(code above is not tested and I assumed the list_type to be "ch_gallery")
Links:
[1]
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/8/9/
Regards,
--
Jigal van Hemert.
More information about the TYPO3-english
mailing list