[TYPO3-english] problem with an own image for page menu [SOLVED]
bernd wilke
t3ng at bernd-wilke.net
Wed Jun 24 16:27:13 CEST 2015
Am 24.06.15 um 09:48 schrieb bernd wilke:
> Am 23.06.15 um 23:40 schrieb Jan Bednarik:
>> Hi,
>>
>> try it with FILES object:
>>
>> lib.follow = HMENU
>> lib.follow {
>> special = directory
>> special.value = 31
>> 1 = TMENU
>> 1 {
>> wrap = <ul>|</ul>
>> NO.ATagTitle.field = title
>> NO.allWrap = <li>|</li>
>> NO.stdWrap.override.cObject = FILES
>> NO.stdWrap.override.cObject {
>> references {
>> table = pages
>> uid.data = field:uid
>> fieldName = media
>> maxItems = 1
>> }
>> renderObj = IMAGE
>> renderObj {
>> file.import.data = file:current:uid
>> file.treatIdAsReference = 1
>> }
>> }
>> }
>> }
>
> that might be possible, but why do I need to use such a big detour?
> building up another query for values already available will slow down
> page generation unneccessary
>
the value for media is only available because of enabled
activateContentAdapter (INSTALL TOOL)
for some reason new fields are not converted.
For all FAL-fields the offical way to access them is to use a FILES
object (so it is a query more) [1]
And so it works in default language, in the translation the image is not
available.
my configuration: this logo field only exists in 'pages' (not in
'pages_language_overlay') as the logo should not been changed in
translation.
as soon as the new field is mentioned in [FE][pageOverlayFields] the
system crashes as the new field does not exist in pages_language_overlay.
and also creating the field in pages_language_overlay (and inserting it
into [FE][pageOverlayFields]) does not solve the problem: only if a file
is stored in pages_langauge_overlay it can be seen in the translated page.
there is no fallback to the values of the page record (language default)
if no file is inserted in the translation. so there is no 'overlay' but
distinct fields.
[1]
http://docs.typo3.org/typo3cms/TyposcriptReference/6.2/ContentObjects/Files/Index.html
--
http://www.pi-phi.de/cheatsheet.html
More information about the TYPO3-english
mailing list