MarioProject
MarioProject

Reputation: 427

Typo3 GP Variables in Form

I created a COA_INT like this:

lib.linguasitoparametrol = COA_INT
lib.linguasitoparametrol {
  10 = TEXT
  10.stdWrap.data = GP:L

}

I print in fluid like so:

Value = {f:cObject(typoscriptObjectPath: 'lib.linguasitoparametrol')}

Result is: Value = 0 or Value = 1. Ok it works.

Now i want to write the variable in a input area so i write:

<f:form.textarea name="search[languageUid]" value="{f:cObject(typoscriptObjectPath: 'lib.linguasitoparametrol')}" />

But i obtain in input value <!--INT_SCRIPT.5e0cf67ea790e31ff7adaa744a7a992c-->

Why? how can i solve it?

Upvotes: 0

Views: 696

Answers (1)

Ren&#233; Pflamm
Ren&#233; Pflamm

Reputation: 3354

The <!--INT_SCRIPT.5e0cf67ea790e31ff7adaa744a7a992c-->should only displayed if you do not cache the page witch contain your template.

<!--INT_SCRIPT.5e0cf67ea790e31ff7adaa744a7a992c--> Is an placeholder for you content that is replaced after cache has build.

You dont need for GP:L a COA_INT object: When you have multiple languages you have allready typoscript conditions for these. So your Cache is build for each of these. The Cache for L=1 is allways different than the cache for L=2.

I would recommend to use it without use of COA:

lib.linguasitoparametrol = TEXT
lib.linguasitoparametrol.data = GP:L

Alternative if you use it in an Fluid Template you can pass the information via variables:

page = PAGE
page.10 = FLUIDTEMPLATE
page.10 {
  template = FILE
  template.file = fileadmin/templates/MyTemplate.html
  partialRootPath = fileadmin/templates/partial/
  variables {
    currentLangUid = TEXT
    currentLangUid.data = GP:L
  }
}

And use it in your Fluid Template by {currentLangUid}, so you dont have to use the cObject Viewhelper.

Upvotes: 2

Related Questions