質問

i want to insert a iframe via Typoscript and a Text-Object. It works, when i want to add 1 variable to the URL-String.

MAIN.10 = TEXT
MAIN.10.data = TSFE:fe_user|user|username
MAIN.10.wrap = <iframe src="http://example.com/index.php?user=|"></iframe> 

Now i have to include 2 variables in the URL-String, like that:

MAIN.10.wrap = <iframe src="http://example.com/index.php?user=|&email=|"></iframe> 

How can i realise that? I'm testing and searching since hours, it would be great if there's somebody out there, who knows a solution.

Thanks for your help.

役に立ちましたか?

解決

The easiest way would to use a coa for it:

MAIN.10 = COA
MAIN.10 {
  10 = TEXT
  10.value = <iframe src="http://example.com/index.php?user=

  20 = TEXT
  20.data = TSFE:fe_user|user|username

  30 = TEXT
  30.value = &email=

  40 = TEXT
  40.data = TSFE:fe_user|user|email

  50 = TEXT
  50.value = "></iframe>

}

You can of course use more sophisticated stdWrap constructs, but this is also quite readable.

Keep in mind that performing actions based on username and e-mail is a possible security issue. At least someone could expose users of your service if they guess both values correctly.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top