[TYPO3-english] Embedding Remote Content into Typo3 CMS Page

Philipp Gampe typo3.lists at philippgampe.info
Tue Jun 28 21:45:35 CEST 2011


Hi Adam,

Adam Retter wrote:

> 1) Cross Site Scripting - the URL I am requesting is from a different
> domain! This is problematic in older browsers. But none the less, it
> can be done.
> 
> 2) I could not get it to work correctly inside the TYPO3 page. I made
> an example which uses a pure minimal HTML page -
> view-source:http://kjc-ws2.kjc.uni-heidelberg.de:8600/exist/apps/test-
embedd1.html
> 
> However when I reuse the JavaScript inside my TYPO3 page, I get
> JavaScript errors, and I really cannot discern why, there seems to me
> that there should be no difference. My TYPO3 page -
> http://www.asia-europe.uni-heidelberg.de/index.php?id=1664

I guess you run into trouble with other JS on the same site.

> So maybe I was not clear, I need to do 1 request to the remote site,
> and from the returned content, extract some items that must be
> inserted into the <head> of the page, and some items that must be
> inserted into the body of the page. So two separate approaches wont
> work, I need a single approach whereby I can manipulate the entire
> page output from TYPO3. I agree that JavaScript (client side) would
> seem like a good idea, but as I have written above, I cant get it to
> work inside a TYPO3 page. Any ideas?

There is a hook to manipulate the whole output. The following extension uses 
it:
http://typo3.org/extensions/repository/view/naw_securedl/current/

This should give you an overview over the page rendering process:


 
>> There are often different ways to reach your goal in TYPO3 as you may
>> have noticed, I don't thinnk there is a "best way" for your problem.
>> I'd try the pure javascript approach since it may be the easiest for you.
>>
>>> Also, it appears that TypoScript does not seem to be a full-fledged
>>> Server side programming language, or am I missing something? If not,
>>> is there something else as well like server side JavaScript in Typo3?
>>
>> Typoscript ain't a "programming language" at all :)
>> See: http://tinyurl.com/6gtegxg (What is Typoscript)
> 
> Ah right, So am I right in thinking that TYPO3, support call-outs to
> PHP as the server-side language? If so, is there a mechanism in TYPO3,
> for me to call a PHP script before the entire page is output from
> TYPO3, and then somehow in PHP modify the DOM of that page, before
> returning it to the web-browser?
see above... there are plenty ways:
http://buzz.typo3.org/people/stucki/article/typo3-frontend-rendering-
explained/

Best regards
-- 
Philipp Gampe


More information about the TYPO3-english mailing list