[TYPO3-english] problem with an own image for page menu
Jan Bednarik
info at bednarik.org
Tue Jun 23 23:40:15 CEST 2015
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
}
}
}
}
Jan
Dne 23. 6. 2015 v 16:53 bernd wilke napsal(a):
> I have a problem with a menu and FAL: I defined a new field for the
> image and use the following TS.
> all fields (25,30) get inserted, but no image-path/name (20) appears, 15
> returns 1 if active
>
>
> 10 = COA
> 10 {
> stdWrap.wrap = <div class="image-container">|</div>
> 10 = TEXT
> 10.value = <img class="img-polaroid"
> src="//{$imageserver}
>
> #15 = TEXT
> #15.field = tx_myext_logo11
> #15.wrap = [|]
>
> 20 = IMG_RESOURCE
> 20 {
> file {
> import {
> field = tx_myext_logo11
> listNum = 0
> }
> treatIdAsReference = 1
> }
> }
>
> 25 = TEXT
> 25.field = title
> 25.wrap = " title="|
>
> 30 = TEXT
> 30.value = " alt="|"
>
> 40 = TEXT
> 40.value = />
> 40.noTrimWrap = | ||
> }
> }
>
> more strange:
> if I change the field to media
> 20 = IMG_RESOURCE
> 20 {
> file {
> import {
> field = media
> listNum = 0
> }
> treatIdAsReference = 1
> }
> }
> the image(path) inserted there is shown.
> my field has nearly the same TCA-definition than media.
> tx_myext_logo11 is restricted to images,
> media has an array entry for foreign_types
>
> any other configuration needed?
>
> bernd
More information about the TYPO3-english
mailing list