简体   繁体   中英

TYPO3 render uncached content element on a dedicated page

I would like to render a page which just has a tt_content element on it (so I can Ajax it into another page). However, due to the way it needs to be set up, this content element needs to remain uncached until rendered.

The same plugin renders perfectly fine when adding via TYPO3, however I want to be able to taget this plugin via JavaScript (without having to load the whole page again).

How can I render the content on the page? When I do the following I get the uncached INT_SCRIPT marker - is there anyway I can force this to render on page load (or make it a “cached” element when selected?

$content = $TSFE->cObj->cObjGetSingle('RECORDS', [
  'tables' => 'tt_content',
  'source' => 123
]);
$response->getBody()->write($content);

I'm using TYPO3 9.5.

Thanks for any help in advance.

(I found this but the solution doesn't work: How to render INT_SCRIPT in StandaloneView?

You could work with a simple uncached page setup provided as another page type and then target that page with your AJAX call.

A solution for that approach has been provided here: TYPO3 Ajax Page Configuration

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM