[TYPO3-mvc] get current CE uid into fluid view

Henjo Hoeksma me at henjohoeksma.nl
Mon Apr 9 15:50:13 CEST 2012


Hi Frank,

current is empty because you don't parse anything to it.

You could use the data property of the cObject viewhelper to parse a
content object through. That will be accessed by the current property.

See [1] for some usage of cObject from within Fluid.

http://www.t3node.com/blog/combining-fluid-viewhelpers-and-typoscript-in-typo3-5-basic-examples/

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.


On Thu, Apr 5, 2012 at 13:42, Frank Gerards <F.Gerards at esolut.de> wrote:

> Hi list J,
>
>
>
> I need the uid of the current content-element the fluid view is
> rendering as information inside a fluid view.
>
> My idea was to get it via a Typoscript Object (of type RECORDS) and
> insert it via <f:cObject ...>.
>
> So in typoscript I made my object like:
>
>
>
> lib.somelib = RECORDS
> lib.somelib {
>
>                tables = tt_content
>
>                source.current = 1
>
>                conf.tt_content = TEXT
>
>                conf.tt_content.field = uid
>
>
>
> }
>
>
>
> By source.current = 1 I thought to get the current uid of the content
> element, much like it is done in TemplaVoila FCEs.
>
>
>
> Sadly, this construct returns nothing. If I change source.current = 1 to
> source = <absolute-dataset-ID> it works perfect.
>
>
> My question: Isnt a fluid view embedded in the usual TYPO3 rendering
> context where I .current = 1 works ?
>
>
>
> Greetz,
>
> Frank
>
>
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>


More information about the TYPO3-project-typo3v4mvc mailing list