Mateng
Mateng

Reputation: 3734

How to use content slide with RECORD objects in typoscript

On one of my sites, content (Videos) is inherited from the levels above if the content column is empty (in this case: colPos=3 / Border)

To create the output, I use

temp.myObject < styles.content.getBorder
temp.myObject {
    slide = -1
}

Easy, because this is taken from a CONTENT object and slide is a built-in function.

Due to our system setup I need to do something similar with the RECORDS object. But the following typoscript doesn't work - it generates empty output:

temp.myObject = RECORDS
temp.myObject {
    tables = tt_content
    source.cObject = CONTENT
    source.cObject {
        slide = -1
        table = tt_content
        renderObj = TEXT
        renderObj.field = uid
    }
}

The same happens with this snippet:

temp.myObject = RECORDS
temp.myObject {
    tables = tt_content
    source.cObject = CONTENT
    source.cObject {
        table = tt_content
        select {
            pidInList.data = leveluid:-1,slide
        }
        renderObj = TEXT
        renderObj.field = uid
    }
}

[Note: The complicated source part above provides the ID of a content element from where we extract an image file from the flexform xml]

Can somebody help me to achieve a contentslide solution based on the RECORDS object? If there are any problems understanding the questions, please ask.

Upvotes: 0

Views: 3357

Answers (1)

Fedir RYKHTIK
Fedir RYKHTIK

Reputation: 9974

CONTENT object doesn't have "slide" property.

Try simulate slide using stdWrap.ifEmpty.cObject.... for Your RECORDS object, as it could be done for slide simulation for TYPO3 3.8.x.

Example on TYPO3 wiki :

http://wiki.typo3.org/wiki/Content_Slide#Content_Sliding_in_TYPO3_3.8.x_by_TS_only

Upvotes: 1

Related Questions